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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…