There seems to be a gap in my understanding of UI-Router and angular's documentation, so forgive me if this seems naive, but here goes:
On http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$stateProvider, there is an example resolve function provided:
resolve: {
myResolve1:
function($http, $stateParams) {
return $http.get("/api/foos/"+$stateParams.fooID);
}
}
I understand that the value returned by this function will be injected into the controller as "myResolve1".
What I am confused about is where the actual values for the parameters "$http" and "$stateParams" are sourced from. In other words, how does the caller determine what values to pass into this function?