如何取消订阅 forkJoin 订阅

时间:2021-07-07 15:24:54

标签: angular rxjs ngrx rxjs-observables rxjs-pipeable-operators

我正在使用 NgRx 开发 Angular 项目,并且处于以下场景:

   forkJoin({
     sub1: this.getSub1(),
     sub2: this.getSub2()
   }).pipe(takeUntil(this.destroy$));
 }

 getSub1() {
   return this.store.select(select1)
     .subscribe();
 }

 getSub2() {
   return this.store.select(select2)
     .subscribe();
 }

问题是:takeUntil(this.destroy$) 会影响 getSub1 和 getSub2 吗?

非常感谢。

0 个答案:

没有答案