Backbone.js View removing and unbinding

后端 未结 4 426
轮回少年
轮回少年 2021-02-03 15:36

when my page opens, I call the collection and populate the view:

var pagColl = new pgCollection(e.models); 
var pagView = new pgView({collection: pagColl});
         


        
4条回答
  •  礼貌的吻别
    2021-02-03 15:59

    I was facing the same issue. I call the view.undelegateEvents() method.

    Removes all of the view's delegated events. Useful if you want to disable or remove a view from the DOM temporarily.

提交回复
热议问题