Closed
Description
I have a state like this:
.state('design', {
url: '/design',
templateUrl: 'design.html',
resolve: {
cc: ['$stateParams', 'configuratorService', function ($stateParams, configuratorService) {
return configuratorService.update($stateParams, true);
}]
},
onExit: ['cc', '$state', function (cc, $state) {
console.log(cc);
}]
}
When I leave the state, I always get this exception: Error: [$injector:unpr] Unknown provider: ccProvider <- cc
. This used to work with angular-ui-router v0.2.18.
I also tried basically any combination of $state.transition.injector().get('cc')
and $transition$.injector().get('cc')
it seems to only be able to get the variables of the next state.
In short: Is there a way to get the values resolved when entering the state in the corresponding onExit function?
Angular 1.5.5, [email protected]