title: Return interdependent async promises in $routeProvider resolve
body: <p>Consider the code:</p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  </code></pre>
  
  <p>The routes: </p>
  
  <pre><code>myApp.config(['$routeProvider', function($routeProvider) {
          $routeProvider.when('/', {
              templateUrl: 'app.html', 
              controller:myAppController, 
              resolve:{
                  resolveData:function(Resolver){
                      return Resolver();
                  }
              }
          });
      });
  </code></pre>
  
  <p>Resolve:</p>
  
  <pre><code>myApp.factory('Resolver', ['$http', function($http){
      return function(){
          return $http({url: '/someurl',method: "GET"}).then(function(data) {
  
              // dependent call 1
              $http({url: '/someotherurl',method: "GET" }).then(function(data) {
  
              });
  
              // dependent call 2
              $http({url: '/someanotherurl',method: "GET" }).then(function(data) {
  
              });
          });
      }
  }]);
  </code></pre>
  
  <p>Above I have nested 2 calls inside one as they are dependent on the data returned by the parent call. </p>
  
  <p><strong>What I want to do</strong>: return the Resolver when all of them have completed and not just the parent call.</p>
  
  <p>I cannot use $q.all() because 2 of the calls are dependent of the first call.</p>
  
  <p>In short, myAppController must be loaded only after all the 3 calls have completed.</p>