【发布时间】:2016-11-30 06:42:49
【问题描述】:
大家好, 链接 RXJS5 结果(如承诺)的最佳方式是什么?
interface MyObj{
name : string
url: string
html: any // async
}
// promise chaining, pretty simple
getMyObjWithPromise()
.then(myObj=>{
// promise, we get back html from myObj.url async
return getMyObjHtmlWithPromise(myObj)
})
.then(myObj=>{
// done, here we have myObj with html
})
与 RXJS5 类似? 我们需要跨流共享 myObj,并异步修改 obj props...
【问题讨论】:
标签: javascript typescript rxjs rxjs5