title: Use a $routeProvider resolve function inside another one
body: <p>I have three resolve promise function inside my $routeProvider. My question is that Can I use getData function inside load function for example to get HTTP request response!</p>
  
  <p>Also will angular wait for getData finish then goes to load? Is it doing them in order and waiting for the promises!?</p>
  
  <pre><code>$routeProvider.when = function(path, route) {
          route.resolve = {
              getData: ['$http', function ($http) {
                  var http = $http({
                      method: 'POST',
                      url: 'a URL',
                      data: {
                          route: "/something"
                      },
                      headers: {
                          'something': 'anything'
                      }
                  });
                  return http;
              }],
              load: [
                  'getData',
                  function(getData) {
                      console.log(getData);
                      // I'm Actually returning a promise here so no problem at all.
                  }
              ],
              prefData: [
                  '$preflightService',
                  function($preflightService) {
                      console.log('Preflight Run');
                      return $preflightService.run();
                  }
              ],
          };
          return originalWhen(path, route);
      };
  </code></pre>
  
  <p>Using this code above I get this Error in Console</p>
  
  <pre><code>Error: [$injector:unpr] http://errors.angularjs.org/1.4.12/$injector/unpr?p0=getDataProvider%20%3C-%20getData
  </code></pre>
  
  <p>What should I do?!</p>
  
  <p>Should I define a provider somehow!?</p>