javascript - Changing Backbone Model defaults attribute -
i have backbone view. want on click event, able change defaults attribute of model.
inside view initialize use .on
function (here doc). example:
initialize: function(options) { model.off(); // if forget write line, works how many time rendered view model.on( 'all', this._handlechanges, this); // or event name }
edit
i used .off()
beacuse here wrote inside on
. off
event whitch 1 bind on
. for more inf
Comments
Post a Comment