7
我有2個API調用 - 第二個調用使用第一個調用返回的內容。承諾這很容易:使用RxJS在Angular2中鏈接observables
myService.findAll()
// First call
.then(response => {
return myService.findSpecific(response.something);
})
.then(response => {
// result from second API call
});
我該如何使用observables?
好一點要記住的是,在RXJS承諾可以爲最多將發出一個單一的項目(解決數據)觀測量處理。 –