title: Trying to post data using ngResource module
body: <p>I am desperately trying to call a simple save on my object using angular ng-resource module. </p>
  
  <pre><code>angular.module('testApp', ['ngResource'])
  .controller('testController', function($scope, Stock) {
      $scope.stock = {};
      $scope.stock.id = 1;
      $scope.stock.name = "Kellog"; 
  
      $scope.submit = function() {    
        Stock.save($scope.stock); 
      };
  });
  
  angular.module('testApp')
  .factory('Stock', function($resource) {
      return $resource('api/stock');
    }
  );
  </code></pre>
  
  <p>I expect to have my data posted (POST verb) but nothing happens, instead I got the following error: </p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'id' of undefined</p>
  </blockquote>