title: Angular resource custom post method
body: <p>I need to post data to a SharePoint list, and I want to clean up my code by using
  a resource factory, until now I have posted data like this: </p>
  
  <pre><code>this.save = function(data) {
      data["__metadata"] = { "type": getItemTypeForListName('ListName') };
      var restQueryUrl = appweburl + "/_api/lists/getByTitle('ListName')/items";
      $.ajax({
          url: restQueryUrl,
          type: "POST",
          headers: {
              "accept": "application/json;odata=verbose",
              "X-RequestDigest": $("#__REQUESTDIGEST").val(),
              "content-Type": "application/json;odata=verbose"
          },
          data: JSON.stringify(data),
          success: function (data) {
              console.log(data);
          },
          error: function (error) {
              alert(JSON.stringify(error));
          }
      });
  };
  </code></pre>
  
  <p>And so far my resource factory looks like this: </p>
  
  <pre><code>myApp.factory('Entry', function($resource) {
  
    return $resource(appweburl + "/_api/lists/getByTitle('ListName')/items", {}, {
      get: {
          method: 'GET',
          headers: { "Accept": "application/json; odata=verbose" },
          url: appweburl + "/_api/lists/getByTitle('ListName')/items?$select=Id,Title,Description&amp;$filter=ID eq :ID"
      },
      query: {
          method: 'GET',
          headers: { "Accept": "application/json; odata=verbose" },
          url: appweburl + "/_api/lists/getByTitle('ListName')/items?$select=Id,Title,Description"
      }
    })
  });
  </code></pre>
  
  <p>How can I 'convert' my save function to a resource method? </p>