In an AngularJs controller I need to ensure a paramount variable initialized before performing other tasks.
var firstPromise = $scope.watch("myParamount"...); // from ng-init
var otherPromises = []; // once obtained myParamount, do others
// something like this?!
$q.firstPromise.then.all(otherPromises).then(function(){
console.log("first, then otherPromises completed!");
})
How to fix this "fake" code?