So I have an array of promises, which are returned from an http request. I want to throttle it to around 5 max at a time because the API can't handle too many requests at once. Is the best way to throttle the promises or to throttle the requests? The code is complicated but basically boils down to this:
var requests = [promise1, promise2...];
$q.all(requests);
Any ideas?