crmServices.factory('Comments', ['$resource',
function ($resource) {
return $resource('api_v3/public/comments/:id', {id: '@id'}, {
get: {method: 'GET', isArray: false},
query: {method: 'GET', isArray: true},
save: {method: 'POST'},
delete: {method: 'DELETE'},
update: {method: 'PUT'}
});
}]);
Comments.update({}, $scope.comment, function (res) {
console.log(res);
}
);