How to clear views before rendering another one? Backbone.js
10,606
you're probably running into zombie views caused by left-over bindings to various types of events. the solution i provided here will help you with that: Disposing of view and model objects in Backbone.js
Author by
fancy
Updated on June 04, 2022Comments
-
fancy almost 2 years
Multiple view instances are happening in my application when I change layouts. I think it's possibly because they use the same
el
but I'm not sure. How would I go about clearing out views before setting up new ones? Or should I create wrapperel
element for each one and clear them from the dom instead?Thanks!