I have a rather clunky looking set of code where the data from one observable is feed into another, like such:
let source = this.myService.getFoo()
.subscribe(result => {
let source2 = this.myService.getMoo(result)
.subscribe(result2 => { // do stuff });
});
I know that there are ways to combine and chain but I need data from source to be feed into source2. The nesting of subscribes looks terrible and I'm pretty certain there is a better way to do this.
Thanks!
getFoo
andgetMoo
, because I'm a beginner with RxJS and can't really grasp what should those function calls return, and I assume that many people have the same issue. – Aleksandar Stefanović