title: a promise for a recursive data structure
body: <p>I want to resolve a recursive data structure before calling a controller, but I'm struggling with how to do this.</p>
  
  <p>my current code looks like this:</p>
  
  <pre><code>region.loadChildren = function() {
      region.children = [];
      return region.resource.all('children').getList().then(function(subs) {
          angular.forEach(subs, function(sub) {
              sub.loadChildren();
              region.children.push(sub);
          });
        }, errorCallback
      );
  };
  </code></pre>
  
  <p>can I somehow "collect" the promises returned by sub.loadChildren() and combine them? </p>