Angular Ui-router Cannot Resolve $resource Results
In one of my UI-router states, I have the following link '/users', which points to a page that shows a list of users. Below is the code I wrote to resolve the list of users by usin
Solution 1:
Change it to:
users: function ($resource) {
return$resource('http://localhost:8080/api/users').query().$promise;
}
Because that way you're returning the promise, and by using then(...), you're resolving the promise within and just returning data thus it won't pass it to the controller because it's returning them after the controller has loaded.
Post a Comment for "Angular Ui-router Cannot Resolve $resource Results"