0
votes

enter image description here

I have my app organizad as in the image...I have a dependency problem when i m trying to inject $state in my app.config module as in the second image

enter image description here

i get the following error :

angular.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=app&p1=Error%3A%20%…frontend%2Fassets%2Fbower_components%2Fangular%2Fangular.min.js%3A20%3A449)

can someone tell me if i m wrong in the order of dependencies?

1
I have the same problem also if I try to inject $rootScope - Pierpaolo Croce
Only providers and constants can be injected into configuration blocks. This is to prevent accidental instantiation of services before they have been fully configured. See more docs.angularjs.org/guide/module - Dmitriy
ok thanks. I m pretty new to angular... - Pierpaolo Croce

1 Answers

1
votes

You have to inject $stateProvider inside your config function, not $state itself.