I'm encountering an issue where this block of code is returning before it has received all the necessary information. Here's my current implementation:
function (){
....
var promise = $http.get(...)
promise.then (...){
//get info needed to return promise
}
return promise
}
The problem is that it's returning before the promise.then function is fully executed. Any ideas on how I could resolve this?