Reputation: 1788
i cant figure out what is the problem
div#wrapper(ng-app="adminApp")
....
js/
var adminApp = angular.module('adminApp', ['ui-router']);
if i use
var adminApp = angular.module('adminApp', []);
the error disappear
why is that?
UPDATE:
adding image from console
Upvotes: 8
Views: 8891
Reputation: 31
It's a little late, but maybe it will save someone's time. In my case I've mixed up links: instead of angular-ui-router.min.js
I've downloaded angular-route.min.js
. Obviously angular-ui-router is necessary for this.
Upvotes: 3
Reputation: 2910
I also had a similar issue and in addition to following the steps outline above by "entre", I had to make sure the angularjs script tag comes before the ui-router tag as such:
<script src="Scripts/angular.min.js" type="text/javascript"></script>
<script src="scripts/angular-ui-router.min.js" type="text/javascript"></script>
The reverse order will also cause an $injector:modulerr
Upvotes: 2
Reputation: 18065
the module name is ui-router
but you need to inject ui.router
and not ui-router
var adminApp = angular.module('adminApp', ['ui.router']);
check out PLUNKER LINK
Upvotes: 24