Last active
August 29, 2015 14:17
-
-
Save nicovalencia/0213b06e5b953c8cea63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = [{ | |
content: 'hotdog 1' | |
}, { | |
content: 'hotdog 2' | |
}, { | |
content: 'hotdog 3' | |
}, { | |
content: 'hotdog 4' | |
}, { | |
content: 'hotdog 5' | |
}]; | |
var promises = _.map(items, function(item) { | |
return itemsService.save(item); | |
}); | |
$q.all(promises).then(function() { | |
// all done | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment