title: How to get access to resource URL params with ngResource?
body: <p>I have an AngularJS service for handling buildings, using ngResource:</p>
  
  <pre class="lang-js prettyprint-override"><code>angular.module('neighborhoodApp')
    .factory('Building', function ($resource) {
      return $resource('/areas/:aid/buildings/:id', {
        'id': '@_id'
      });
    });
  </code></pre>
  
  <p>In one of my view, I list the buildings:</p>
  
  <pre class="lang-js prettyprint-override"><code>$scope.buildings = Building.query({
    aid: $routeParams.aid
  });
  </code></pre>
  
  <p>Note that I am getting the area id from the route, but this information is not stored inside my model.</p>
  
  <p>My issue is that when I display my buildings, I would like to use the area id but I don't have access to it:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div ng-repeat="building in buildings"&gt;
    {{building | json}}
    &lt;!-- 'building' doesn't include the area id
         I can't modify the server response and somehow
         I shouldn't have to, the information is inside the URL of the query()
         Can I get URL params from the resource instance? --&gt;
  &lt;/div&gt;
  </code></pre>