hwz/chirp

Delete method is not work

Valonix opened this issue · 1 comments

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? :(

Enable delete method please use the override module.

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