When calling a function that returns a promise, comes back as undefined unless async operators are removed, then returns ZoneAwarePromise, but contains no data. I know the query returns data when the function executes, it however does not seem to pass that data to the actual return part of the function call. I have looked at several Stack questions that
Tag: angular-promise
How to return a resolved promise from an AngularJS Service using $q?
My service is: I’m calling this in my config file via: However, it complains that then is not a function. Aren’t I returning the resolved promise? Answer From your service method: And in your controller: