Is there a way to process an array where each value returns a Promise in the same order they're specified? For example, if I want to make multiple Ajax calls like this:
var array = [
'http://example.org',
'http://otherexample.org',
'http://anotherexample.org',
];
A similar question has been raised on Stack Overflow: How can I use RxJs to hold off any requests for an AJAX call until the previous one resolves, which suggests using flatMapFirst
.
While working with Angular2 (beta-15
) in TypeScript, I discovered that flatMapFirst
has been renamed to exhaustMap
.
However, I couldn't find this operator in Observable.ts or in the bundled version of RxJS https://code.angularjs.org/2.0.0-beta.15/Rx.js.
So, is there a workaround for this issue? Should I consider using one of the build scripts listed in the package.json?
Just to clarify, I am working with the ReactiveX/rxjs library, not Reactive-Extensions/RxJS