title: Set path parameter without affecting payload using $resource
body: <p>First of all I want to mention that I have been digging around a lot for this. I am unable to find a simple and straight forward answer even in the <a href="https://docs.angularjs.org/api/ngResource/service/$resource" rel="nofollow">docs</a>. (Call me dumb if you will, in case it IS mentioned in the docs! I can't seem to find it anyway.)</p>
  
  <p>The thing is, I want to make a PUT request to a URL of the form</p>
  
  <pre><code>app.constant('URL_REL_VENDOR_PRODUCTS', '/api/vendor/:vendorId/products/:productId');
  </code></pre>
  
  <p>But I do not want to put the <code>vendorId</code> parameter in the request payload. My service layer looks something like this:</p>
  
  <pre><code>services.factory('VendorProductService', function($resource, UserAccountService, URL_BASE, URL_REL_VENDOR_PRODUCTS) {
      return $resource(URL_BASE + URL_REL_VENDOR_PRODUCTS, {
          vendorId: UserAccountService.getUser().vendorId,
          id: '@id'
      }, {
          update: { method: 'PUT' }
      });
  });
  </code></pre>
  
  <p>I know that instead of the <code>vendorId: UserAccountService.getUser().vendorId</code> I could have written something along the lines <code>vendorId: '@vendorId'</code> but then that pollutes my payload doesn't it?</p>
  
  <p>I don't want to keep the mechanism I am already using in the example as the mechanism does not work when you switch accounts i.e.,if the <code>UserAccountService.getUser()</code> is updated. Basically I'm having to reload the entire page to get the service initialized again.</p>
  
  <p>In short, the question is, as the title suggests, how do I set the path parameter <code>vendorId</code> without using a service like the one in the snippet and also without modifying the payload?</p>