The provided example will allow you to do sequential requests to the server in Angular.js.
It will iterate all the items and call server for each item, however, if one request will fail, all sequential requests will be aborted.
If you need to call all requests no matter what, just replace promise.then()
with promise.finally()
.
Cheers!
Thank you for sharing this solution. Spent whole day to find an elegant solution, finally got it!
Cheers.
Karen