I have a promise in a loop, and I don\'t know how to pass some scope variables into the promise handler.
for(var i in superarray){ MyService.get(superarray[i
You can simplify the code a bit by using the built-in Array.prototype.forEach:
Array.prototype.forEach
superarray.forEach(function (item, index) { MyService.get(item.externalID).then(function(r) { console.debug(index); }); });