Destroy or remove a view in Backbone.js

后端 未结 7 1670
没有蜡笔的小新
没有蜡笔的小新 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:43

    According to current Backbone documentation....

    view.remove()

    Removes a view and its el from the DOM, and calls stopListening to remove any bound events that the view has listenTo'd.

提交回复
热议问题