mardi 23 décembre 2014

Resolving dependency for $state.go in Angular UI Router


I have a provider config which uses $state.go to jump to states. When I use $state as a function parameter it works, but when I try to modify the function parameters to support minification such as



.provider('Navigation',["$stateProvider","$state",function($stateProvider,$state)


then I get the following resolve dependency error :



Uncaught Error: [$injector:modulerr] Failed to instantiate module apfPrototypeJs due to:
Error: [$injector:unpr] Unknown provider: $state


How to circumvent this problem?





Aucun commentaire:

Enregistrer un commentaire