I am trying to separate my controllers and services (previously all in my one app.js file) into separate js files. However I am getting a Uncaught TypeError: undefined is not a function
from the first line of one of my separated services (authInterceptorService shown below).
Here is the module code from my app.js:
var app = angular.module('AngularAuthApp', [
'ngRoute',
'LocalStorageModule',
'angular-loading-bar'
]);
//some app.constants
Here is my service in a separate authInterceptorService.js file (Uncaught TypeError happens on the first line:
app.factory('authInterceptorService', [
'$q',
'$injector',
'$location',
'localStorageService',
function ($q, $injector, $location, localStorageService) {
//more code
return authInterceptorServiceFactory;
}
]);
Am I missing a piece of proper syntax? I thought I followed the example provided in this stack post. I am also referencing these separate js files in my html. Please let me know if I am missing something in my controller or module setup, or if I should be doing this another way.
Thank you very much for your time. Let me know if you need additional information or if I am being unclear.