title: Get parameter in transformRequest
body: <p>I use a REST Server API with angular $resource. I have no control over the Server API. The Server API requires that a list item has a property ItemTyp, which the list name with a Item appended. Which is redundant information</p>
  
  <p>I would like to use the same resource for multiple lists and no. I tried following:</p>
  
  <pre><code>(function () {
      'use strict';
  
      angular.module('mod', ['ngResource']);
  
      angular.module('mod').controller('Controller', function (ListItem) {
          var listItem1 = new ListItem({ a: 1 });
          listItem1.$save();
  
          var listItem2 = new ListItem({ b: 2 });
          listItem2.$save({ listName: 'list2' });
      });
  
      angular.module('mod').factory('ListItem', function ($resource) {
          return $resource('/_api/lists/:listName/:Id', { listName: 'list1', Id: '@Id' },
              {
                  save: {
                      method: 'POST',
                      transformRequest: function (data) {
                          //data.ItemTyp = listName + "Item";
                          return angular.toJson(data);
                      }
                  }
              });
      });
  })();
  </code></pre>
  
  <p>But I found no way to get the params in the transformRequest. Is there a way to get the params or a other way to solve my problem?</p>