I obviously have missed something from UI-Router and/or angular's documentations so, although I will sound stupid, here it is:
In http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$stateProvider we have an example resolve function:
resolve: {
myResolve1:
function($http, $stateParams) {
return $http.get("/api/foos/"+$stateParams.fooID);
}
}
I understand that its return value will be injected into the controller under the name "myResolve1".
What is less clear to me is where the values for the function parameters "$http" and "$stateParams" are coming from. So, where did the caller find the values to give to this function ?