Skip to content

Instantly share code, notes, and snippets.

@TaylorAckley
Last active February 22, 2021 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TaylorAckley/e5c5dcdbee51ab9f3888051db281135f to your computer and use it in GitHub Desktop.
Save TaylorAckley/e5c5dcdbee51ab9f3888051db281135f to your computer and use it in GitHub Desktop.
Nested Observable
// returns the outermost subscription, which is not what we want.
someMethod(): Observable<string> {
return this.someService.getSetupData().subscribe(setupData => {
this.someOtherService.getUsefulData(setupData).subscribe(usefulData => {
return of(usefulData.someString);
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment