RxJS Observables nested subscriptions?

As mentioned in comments, you are looking for the flatMap operator.

You can find more details in previous answers :

  • How to do the chain sequence in rxjs
  • Why do we need to use flatMap?

Your example would read as :

this.returnsObservable1(...)
  .flatMap(success => this.returnsObservable2(...))
  .flatMap(success => this.returnsObservable3(...))
  .subscribe(success => {(...)}); 

Leave a Comment