I was wondering how can I process an array where each value returns a Promise in the same order as they're specified. For example, let's say I want to call multiple Ajax calls in this order:
var array = [
'http://example.org',
'http://otherexample.org',
'http://anotherexample.org',
];
There's basicaly the same question: How can I use RxJs to hold off any requests for an AJAX call until the previous one resolves, which suggests using flatMapFirst
.
Since I'm using Angular2 (beta-15
at this moment) in TypeScript which uses rxjs@5.0.0-beta.2
I found out that flatMapFirst
has been renamed to exhaustMap
.
But this operator isn't listed in Observable.ts, therefore I can't use it. It's not even present in the bundled version of RxJS https://code.angularjs.org/2.0.0-beta.15/Rx.js.
So, how am I supposed to use it? Or is there any other way to the what I need? Its package.json lists a lot of build scripts, should I force it to use one of them?
Edit: I should mention I'm using ReactiveX/rxjs library, not Reactive-Extensions/RxJS