title: AngularJS $resource passes id as query parameter instead in url
body: <p>I need to GET data from a rest API, with the product id part of the url (and not as query parameter).</p>
  
  <p>The factory:</p>
  
  <pre><code>.factory('Products', ['$resource',
      function($resource) {
          return $resource('products/:productId', {
              productId: '@id'
          }, {
              query: {
                  isArray: false
              },
              update: {
                  method: 'PUT'
              }
          });
      }
  ])
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>$scope.getProduct = function(id, from) {
      $scope.product = Products.get({ id: id }, function(){
          console.log($scope.product);
      });
  }
  </code></pre>
  
  <p>My url is constructed like:</p>
  
  <pre><code>/products?id=5426ced88b49d2e402402205
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>/products/5426ced88b49d2e402402205
  </code></pre>
  
  <p>Any ideas why?</p>