title: How to inject a service into app.config in AngularJS
body: <pre><code>wikiApp.config(['$routeProvider','authService', 
    function($routeProvider,authService) {
  var admin = authService.getLoggedin();
  
  $routeProvider
      .when('/hjem',{
          templateUrl: 'partials/homeContent.html',
      admin: false
      })
    .when('/articles/:article',{
      templateUrl: 'partials/articles.html',
      admin: false
    })
    .when('/newArticle',{
      templateUrl: 'partials/postArticle.html',
      controller: 'articleController',
      admin: true
    })
  </code></pre>
  
  <p>The authService.getLoggedin() returns either false or true depending on if the user is logged in or not. Then i would like to not allow them to the Url if they are not allowed.</p>
  
  <p>But i get this error:
  Error: [$injector:modulerr] Failed to instantiate module wikiApp due to:
  [$injector:unpr] Unknown provider: authService</p>