In my current setup, I have a default ngResource that is defined in the following way:
var Posts = $resource('/posts/');
Once I retrieve a blog post from my nodejs server using the code below:
$scope.post = Posts.get({_id:query._id});
The user makes some modifications to the post, and then I proceed with calling:
$scope.post.$save();
Upon receiving a response code of 200 from the server, the contents of $scope.post appear as follows:
g {0: "O", 1: "K", $get: function, $save: function, $query: function, $remove: function, $delete: function}
Why does this happen? Could the letters "O" and "K" symbolize a successful operation and an HTTP response code of 200? Is there any way to modify this behavior without creating a custom save method from scratch?