Suppose I have an array var numbers = [0, 1, 2] and an $http request.
I want to chain as many .then() functions after the $http.get() as there are items in numbers. So I want code like
//for each item in numbers
.then(function(){
$http.get(...)
.then(function(){
$http.get(...)
.then(...)
})
})
so that the code runs as
.then(
$http.get(...)
.then(
$http.get(...)
.then(
$http.get(...)
)
)
)
Is that possible?