At Ember.js Guide, there is an example like that:
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.errors = [];
},
didUpdateAttrs() {
this._super(...arguments);
this.set('errors', []);
},
...
});
Why assigning to errors
property is different at init
and didUpdateAttrs
? What are their differences?
Aucun commentaire:
Enregistrer un commentaire