title: Angular module config not called
body: <p>I'm trying to get my head around AngularJS and ran into a problem.<br></p>
  
  <pre><code>var myApp = angular.module('myApp', ['myApp.services']);
  
  myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
  
      console.log('Configuring module "myApp"');
  
      $routeProvider.when('/dashboard', {templateUrl: 'partial/dashboard', controller: DashboardController});
      $routeProvider.when('/menu', {templateUrl: 'partial/other', controller: OtherController});
      $routeProvider.otherwise({redirectTo: '/dashboard'});
  
      $locationProvider.html5Mode(true);
   }]);
  </code></pre>
  
  <p>To my understanding the configuration function should be called when the module gets loaded. <strong>But it does not!</strong></p>
  
  <p>I have the <code>ng-app="myApp"</code> directive on the <code>&lt;body&gt;</code> tag. And scripts loaded just before the body closing tag in the correct order (as far as that matters).</p>
  
  <pre><code>    &lt;script src="angular.js"&gt;&lt;/script&gt;      
      &lt;script src="app.js"&gt;&lt;/script&gt;
      &lt;script src="services.js"&gt;&lt;/script&gt;
      &lt;script src="controllers.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I'm pretty sure I must be overlooking something trivial here. There should be a message printed to the console. But it remains empty with no errors or warnings whatsoever.</p>
  
  <p><strong>The parts of the app not depending on the routes runs just fine.</strong></p>
  
  <h3>Update: simplified version of my service.js</h3>
  
  <pre><code>'use strict';
  
  angular.module('myApp', function ($provide) {
      $provide.factory('myService', function ($http) {
          var service = function () {
              ...
              service implementation
              ...
          };
  
          return new service();
      });
  });
  </code></pre>