title: Inject service in app.config
body: <p>I want to inject a service into app.config, so that data can be retrieved before the controller is called. I tried it like this:</p>
  
  <p>Service:</p>
  
  <pre><code>app.service('dbService', function() {
      return {
          getData: function($q, $http) {
              var defer = $q.defer();
              $http.get('db.php/score/getData').success(function(data) {
                  defer.resolve(data);            
              });
              return defer.promise;
          }
      };
  });
  </code></pre>
  
  <p>Config:</p>
  
  <pre><code>app.config(function ($routeProvider, dbService) {
      $routeProvider
          .when('/',
          {
              templateUrl: "partials/editor.html",
              controller: "AppCtrl",
              resolve: {
                  data: dbService.getData(),
              }
          })
  });
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>Error: Unknown provider: dbService from EditorApp</p>
  </blockquote>
  
  <p>How to correct setup and inject this service?</p>