Backbone - Is it possible to bind a change event to a model, except for one property?
You could use model.bind('change',function() {/*...*/})
and in the function use hasChanged
to check the attributes: if(model.hasChanged('propIWantToExclude')) return;
Justin's answer above will return when 'propIWantToExclude' and some other attributes are changed together. You probably don't want to do that, so you should also look at the size of model.changedAttributes
:
if(model.changedAttributes.length == 1 && model.hasChanged('attrIWantToExclude')) {
return;
}