Last active
February 22, 2021 20:23
-
-
Save TaylorAckley/e5c5dcdbee51ab9f3888051db281135f to your computer and use it in GitHub Desktop.
Nested Observable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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