Folks, how I could 'catch' event when Backbone collection receives array with data? I need this to loop data and join some items on some conditions. I have:
MyColl = Backbone.Collection.extend({
model : App.Models.Movie,
url: '/movies/start',
events : {
'then': 'show', // no one is calling
'fetch': 'show'
},
show: function() {
console.log(this.models);
console.log(this.collection);
}
});
And after fetching, when data is coming to collection, I need to do some magic stuff with data. Thanks for your answers.
Aucun commentaire:
Enregistrer un commentaire