javascript - Backbone Model array property change and change event listener not always firing -
this question has answer here: does backbone.models this.get() copy entire array or point same array in memory 1 answer i found strange in backbone using change events. it's model wich has array property. , if property push new value inside , set model change event not fired... here's documented example: var testmodel = backbone.model.extend({ defaults : { numbers : [] }, initialize : function() { this.on('change:numbers', this.changedevent); }, changedevent : function() { console.log('model has changed'); } }); var otestmodel = new testmodel(); otestmodel.set('numbers', [2, 3, 4]); // change:numbers event fired var anumbers = otestmodel.get('numbers'); anumbers.push(5); otestmodel.set('numbers', anumbers); // change:numbers event not fired why??? /