I have an Angular 4 app with a product list component that displays the names of the products. The names of the products are retrieved from the server API. There are 1000 products which has to be retrieved in a few ajax calls AjaxObservable
. Every call return 200 products, so have to make 5 calls to return all the products.
How can I achieve the above with AjaxObservable
? Should I merge all the observables or create single only and allow the UI to subscribe?
for (var i = 0; i < 5; i++) {
var source = Rx.Observable.ajax({ url: 'products', method: 'GET' });
}