angular-tasty-resource icon indicating copy to clipboard operation
angular-tasty-resource copied to clipboard

Delete function?

Open audoeyop opened this issue 10 years ago • 1 comments

Is there a function to DELETE of remove?

audoeyop avatar Nov 13 '14 17:11 audoeyop

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!

fproldan avatar Jan 12 '15 14:01 fproldan