I have the following code on the resolve member in a route:
resolve: {
loadData: function ($q) {
var deferred = $q.defer();
var fbRef = new Firebase("https://myPathToFirebase");
var auth = new FirebaseSimpleLogin(fbRef, function (error, user) {
console.log('resolving. ' + user.id + ', Provider: ' + user.provider);
deferred.resolve();
});
console.log('returning..');
return deferred.promise;
}
}
The callback within FirebaseSamleLogin is simplified for clarity The logging shows that the code runs as expected. User-id and provider ( facebook) is printed in the callback. My problem is that the deferred.resolved() is not working. The code will not continue to run the controller code and render the template. Exactly as if the deferred was never resolved. I’m kind of stuck here and any help / suggestions would be appreciated Thank you
console.log("Returning promise..." , deferred.promise)and let us know if that helps.