【发布时间】:2018-07-10 08:24:34
【问题描述】:
const source = Rx.Observable.from([1, 2, 3, 4, 5]);
const example = source.map(val => { /* asynchronous logic here*/ })
.map(val => { /* asynchronous logic here*/ });
.map(val => { /* asynchronous logic here*/ });
如何使每个map 等待前一个map 的异步执行?
【问题讨论】:
-
你看过flatmap吗?我认为这就是你需要的link
-
使用
concatMap并从其回调中返回一个 Observable。 -
@martin 你是我的英雄,请写下答案让我接受
标签: javascript angular rxjs