title: 'Uncaught TypeError: undefined is not a function' when putting controllers/services in a separate js file
body: <p>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 <code>Uncaught TypeError: undefined is not a function</code> from the first line of one of my separated services (authInterceptorService shown below). </p>
  
  <p>Here is the module code from my app.js:</p>
  
  <pre><code>var app = angular.module('AngularAuthApp', [
      'ngRoute',
      'LocalStorageModule',
      'angular-loading-bar'
  ]);
  
  //some app.constants
  </code></pre>
  
  <p>Here is my service in a separate authInterceptorService.js file (Uncaught TypeError happens on the first line:</p>
  
  <pre><code>app.factory('authInterceptorService', [
      '$q',
      '$injector',
      '$location',
      'localStorageService',
      function ($q, $injector, $location, localStorageService) {
  
  //more code
  
          return authInterceptorServiceFactory;
      }
  ]);
  </code></pre>
  
  <p>Am I missing a piece of proper syntax? I thought I followed the example provided in <a href="https://stackoverflow.com/questions/20087627/how-to-create-separate-angularjs-controller-files">this stack post</a>. 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.</p>
  
  <p>Thank you very much for your time. Let me know if you need additional information or if I am being unclear.</p>