Skip to content

Instantly share code, notes, and snippets.

View ippezshelby's full-sized avatar
💭
I'm just a man trying to make an honest living in a very dark world

Tommy Shelby ippezshelby

💭
I'm just a man trying to make an honest living in a very dark world
View GitHub Profile
@slavafomin
slavafomin / 0-readme.md
Last active April 4, 2020 04:29
Loop promises in Angular.js / Run list of actions sequantually

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!