Destroy or remove a view in Backbone.js

后端 未结 7 1649
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 09:57

I\'m currently trying to implement a destroy/remove method for views but I can\'t get a generic solution to work for all my views.

I was hoping there would be an eve

7条回答
  •  独厮守ぢ
    2020-11-27 10:45

    This is what I've been using. Haven't seen any issues.

    destroy: function(){
      this.remove();
      this.unbind();
    }
    

提交回复
热议问题