I am using a REST api, and I would like to update my project objects with a PUT request. The request is supported in the API, and I'm trying to use $ resource for PUT data, but it does not seem to work. That's what I'm doing:
var projectResource = $resource('/api/projects/' + projectId, {update: {method: "PUT"}}); $scope.editProject = function(editedProject) { projectResource.$update(editedProject); }
If editProject is a project with new values, filled out a form on a web page. I know that something is wrong in my projectResource declaration, but I do not find that. Help!
source share