APP.Model_a = DS.Model.extend({
name: DS.attr(),
model_b: DS.hasMany('model_b'),
});
APP.Model_b = DS.Model.extend({
name: DS.attr(),
});
Above I have two models Model_a and Model_b. In Route I have following model method which is being called after every 5 seconds.
model: function(){
var model = currentInstance.store.findAll('model_a');
model.then(function(response){}, function(error){});
return model;
}
},
After every 5 seconds server sends live data. What is no data is changed from back end? Will Ember still try to re-render the whole view?
Aucun commentaire:
Enregistrer un commentaire