javascript - 'Uncaught TypeError: undefined is not a function' when putting controllers/services in a separate js file -


i trying separate controllers , services (previously in 1 app.js file) separate js files. getting uncaught typeerror: undefined not function first line of 1 of separated services (authinterceptorservice shown below).

here module code app.js:

var app = angular.module('angularauthapp', [     'ngroute',     'localstoragemodule',     'angular-loading-bar' ]);  //some app.constants 

here service in separate authinterceptorservice.js file (uncaught typeerror happens on first line:

app.factory('authinterceptorservice', [     '$q',     '$injector',     '$location',     'localstorageservice',     function ($q, $injector, $location, localstorageservice) {  //more code          return authinterceptorservicefactory;     } ]); 

am missing piece of proper syntax? thought followed example provided in this stack post. referencing these separate js files in html. please let me know if missing in controller or module setup, or if should doing way.

thank time. let me know if need additional information or if being unclear.

put authinterceptorservice in app.js dependencies.

so:

var app = angular.module('angularauthapp', ['ngroute', 'localstoragemodule', 'authinterceptorservice', 'angular-loading-bar']); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -