Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: $injector:modulerr Module Error with ui-router

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

enter image description here

like image 415
andrescabana86 Avatar asked Aug 05 '14 04:08

andrescabana86


2 Answers

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

like image 183
harishr Avatar answered Sep 30 '22 19:09

harishr


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.

like image 36
Sentinel Avatar answered Sep 30 '22 21:09

Sentinel