title: $resouce query with parameters
body: <p>I'm learning Angular and was building a service which uses $resource to work with data.  I'm able to use query() to get a list of data, but now I wanted to filter it down to just a list of specific items.  I've created a method in my asp.net MVC code to get called, it takes 2 parameters (sectionId and typeId) but I don't see the method being called by angular.  My breakpoints are never hit in my asp.net code.  My angular call is below:</p>
  
  <pre><code>(function () {
  'use strict';
  
  testModule.factory('InventoryRepository', ['$resource', InventoryRepository]);
  
  function InventoryRepository($resource) {
      return {
          get: function (sectionType, typeId) {
              return $resource('/mySite/GetInventoryGrid/:sectionType/:typeId', {sectionType: '@sectionType', typeId: '@typeId'}, {
                  query: {method: 'GET', isArray:true}
              }).query();
          },
          save: function (inventoryItem) {
              return $resource('/mySite/SaveInventoryItem').save(inventoryItem);
          },
          remove: function (inventoryItem) {
              return $resource('/mySite/RemoveInventoryItem').save(inventoryItem);
          }
      }
  }
  })();
  </code></pre>
  
  <p>the save and remove methods work fine, i'm just not sure how to get the query to work with parameters.  this result is then returned to my calling controller:</p>
  
  <pre><code>vm.Inventories = InventoryRepository.get(sectionType, typeId);
  </code></pre>
  
  <p>I see the call does work as my breakdowns in Chrome do get into the get method of the InventoryRepository.  Using Fiddler I see the call made with a 500 return, it appears to not have passed the parameters along.</p>
  
  <p>Update, I fixed it by changing the following:
  from my controller:</p>
  
  <pre><code>vm.Inventories = InventoryRepository.get({ sectionType: sType, typeId: typeId});
  </code></pre>
  
  <p>and my service get method to:</p>
  
  <pre><code>            get: function (params) {
              return $resource('/mySite/GetInventoryGrid?sectionType=:sectionType&amp;typeId=:typeId', { sectionType: '@sectionType', typeId: '@typeId' }, {
                  query: {method: 'GET', isArray:true}
              }).query({ sectionType: params.sectionType, typeId: params.typeId});
          },
  </code></pre>
  
  <p>I didn't realize that the get method call was combining the 2 params into 1 object when it was passed into get.</p>