This block of code is returning before it gets all the info it needs I have this:
function (){
....
var promise = $http.get(...)
promise.then (...){
//get info needed to return promise
}
return promise
}
It's returning before the promise.then is finished, how could I fix this?