在Rxjs 5.5.7中无法使用多个订阅在RxjS 6.3.3中无法使用

时间:2019-04-03 07:35:13

标签: angular rxjs6

this.msService.createUpdate击中2次并抛出错误。 我已经尝试过使用take(1),但是那也不起作用。

  this.msService.save(this.ms).subscribe((ms: any) => {                   this.msService.getDataItemWithCalculations(String(this.DataItemId)).subscribe((calcs:any) => { //other manipulations                              this.msService.createUpdate(this.ms).subscribe(mswithChild => {
                       //service is hitting twice
                            this.msService.getDataItemWithCalculations(String(this.ms.DataItemUID)).subscribe(
                                (ms :any)=> {
                                    //other manipulations
                                this.setNotificationMessage();
                                }, error => this.setNotificationMessage();
                                  }, error => this.setNotificationMessage();
                                    }, error => this.setNotificationMessage();
                                      }, error => this.setNotificationMessage();

0 个答案:

没有答案