Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete method is not work #9

Open
Valonix opened this issue Oct 24, 2015 · 1 comment
Open

Delete method is not work #9

Valonix opened this issue Oct 24, 2015 · 1 comment

Comments

@Valonix
Copy link

Valonix commented Oct 24, 2015

I try to delete some post and see error
I separate factory for posts with this code
.factory('postService', [ '$resource', function($resource) {
return $resource('/posts/:id', null, {
'update': { method:'PUT' }
});
}]);

and in another controller i try to delete some post with this code

$scope.deletePost = function(post){
postService.delete(post);
}

In view this
Delete Current Post

In chrome console i see 404 error. In putty see this http://ipic.su/img/img7/fs/kiss_1kb.1445717737.png

What i am doing wrong? :(

@milkdeliver
Copy link

Enable delete method please use the override module.

var methodOverride= require("method-override");
app.use(methodOverride());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants