title: AngularJS - Run code after multiple resources load
body: <p>I want to execute some code once I load resources from my back-end.
  I was able to do this by using a callback on ONE resource request like this:</p>
  
  <pre><code>$scope.resrc = Resrc.query({idResource: 1}, function(){
      //CODE AFTER RESOURCE IS LOADED
  });
  </code></pre>
  
  <p>But trying to use $q to wait for MULTIPLE resources to load an then execute code is NOT working for me! (As they suggest here <a href="https://stackoverflow.com/a/14545803/215945">https://stackoverflow.com/a/14545803/215945</a>)</p>
  
  <pre><code>$q.all([
          $scope.services = Services.query({idResource: 1}),
          $scope.brands = Brands.query({idResource: 1})
      ]).then(function() { 
          //CODE AFTER RESOURCES ARE LOADED 
  });
  </code></pre>
  
  <p>What am I doing wrong?</p>