AngularJS - Dependency injection on controllers module -


having real issues wrapping head around issue i'm having angular. i'm trying set multi-page app routing. app.js looks little this:

var app = angular.module('app', ['angularlocalstorage', 'ngroute', 'ngresource', 'authcontrollers', 'authservices', 'eventcontrollers', 'eventservices']);  app.config(['$routeprovider', '$httpprovider',       function($routeprovider, $httpprovider) {         $routeprovider.           when('/', {             templateurl: 'partials/events.html',             controller: 'eventlistcontroller'           }).           otherwise({             redirectto: '/'           });  ... 

i'm attempting make module - app depend on eventcontrollers, i'm getting following error:

error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=app&p1=%5b%24injector%3amodulerr%5d%20http%3a%2f%2ferrors.angularjs.org%2f1.3.15%2f%24injector%2fmodulerr%3fp0%3deventcontrollers%26p1 

this leads me believe can't load eventcontroller module whatever reason.

my controllers.js looks little this:

(function () {     var authcontrollers = angular.module('authcontrollers', []);     var eventcontrollers = angular.module('eventcontrollers', []);      eventcontrollers.config(function($stateprovider) {         $stateprovider.state('events', { // state showing events             url: '/events',             templateurl: 'partials/events/list.html',             controller: 'eventlistcontroller'         }).state('viewmovie', { //state showing single event             url: '/events/:id/view',             templateurl: 'partials/events/single.html',             controller: 'eventviewcontroller'         }).state('newmovie', { //state adding new event             url: '/events/new',             templateurl: 'partials/events/create.html',             controller: 'eventcreatecontroller'         }).state('editmovie', { //state updating event             url: '/events/:id/edit',             templateurl: 'partials/events/edit.html',             controller: 'eventeditcontroller'         });     }).run(function($state) {         $state.go('events'); //make transition events state when app starts     }); 

i'm sure answer simple, , i'm missing basic, i'd appreciate pointers.

the eventcontrollers module declared inside controllers.js, issue?


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -