title: How to inject dependencies in app.config in angularjs?
body: <p>I've been getting errors when minifying my AngularJS app because manually injected dependencies aren't working how I'd expect. The following didn't work:</p>
  
  <pre><code>var config = app.config(function($routeProvider) {
      $routeProvider
          .when('/', {controller: 'PageCtrl', templateUrl: '../templates/home.html'});
          .otherwise({redirectTo: '/'});
  });
  config.$inject = ['$routeProvider'];
  </code></pre>
  
  <p>The only thing that worked is:</p>
  
  <pre><code>app.config(['$routeProvider', function($routeProvider) {
      ...
  }]);
  </code></pre>
  
  <p>Why does the first dependency injection technique work for controllers but not configs?</p>