How to return a `forkJoin` observable when piping the operators

前端 未结 2 1579
故里飘歌
故里飘歌 2021-01-03 02:22

Before I had this resolver that just worked fine:

resolve() {
    return forkJoin(
        this.getData1(),
        this.getData2(),
        this.getData3()
         


        
2条回答
  •  滥情空心
    2021-01-03 02:58

    Thanks to @Sajeetharan by looking to this url ended up using exhaustMap

      resolve() {
        return this.actions$.pipe(
          ofActionSuccessful(LoadOnPremHostSuccess),
          exhaustMap(() => {
            return forkJoin(
              this.getData1(),
               this.getData2(),
               this.getData3()
            );
          })
        );
    

    }

提交回复
热议问题