1
RxJS中的链接可观察对象
我正在学习RxJS和Angular2。比方说,我有一个带有多个异步函数调用的promise链,这取决于前一个的结果,如下所示: var promiseChain = new Promise((resolve, reject) => { setTimeout(() => { resolve(1); }, 1000); }).then((result) => { console.log(result); return new Promise((resolve, reject) => { setTimeout(() => { resolve(result + 2); }, 1000); }); }).then((result) => { console.log(result); return new Promise((resolve, reject) => { setTimeout(() => { resolve(result + 3); …