angular-tasty-resource
angular-tasty-resource copied to clipboard
Delete function?
Is there a function to DELETE of remove?
Hi!, there is not function DELETE, but i added this code to tasty-resource.js.
TastyResourceFactory.prototype.remove = function(id) {
var promise, url,
_this = this;
url = this._get_detail_url(id);
this._resolved = false;
promise = this.$http.delete(url, this._get_data());
promise.then(function() {
return _this._resolved = true;
});
return promise;
};
Hope this help you!