title: How to pass form data along with angularjs api call using ngresource?
body: <p>I have my data in json at controller, now i want to send that data to an post api call in service.
  service - Article</p>
  
  <p>At my controller :</p>
  
  <pre><code>var annotationScripts = {startOffset : range.startOffset , endOffset : range.endOffset};
      Article.post({id: $routeParams.articleId},{data : annotationScripts}
  );
  </code></pre>
  
  <p>At my service :</p>
  
  <pre><code>factory('Article', function($resource) {
          return $resource('article/:id', {}, {
              query: { method: 'GET', isArray: false },
              post : { method: 'POST', params:{id : '@id'} , data : {@data}, headers: {'Content-Type': 'application/x-www-form-urlencoded'}}
          })
      });
  </code></pre>