Closed ChangJoo-Park closed 9 years ago
setObserver: function() {
this.addObserver(article.state', this, this.stateChanged); // article.state with ' ?
// we need to call get on the property so the observers are setup
// see for more info http://cl.ly/1f0Y1v2A1G04
this.get('article').get('state');
}.on('init'),
stateChanged: function() {
if (this.get(article.isDirty') && !this.get(article.isSaving')) {
Ember.run.once(this, this.autoSave);
}
I simplified this in today's release, thanks!
setObserver: function() {
this.addObserver(article.state', this, this.stateChanged); // article.state with ' ?
// we need to call get on the property so the observers are setup
// see for more info http://cl.ly/1f0Y1v2A1G04
this.get('article').get('state');
}.on('init'),
stateChanged: function() {
if (this.get(article.isDirty') && !this.get(article.isSaving')) {
Ember.run.once(this, this.autoSave);
}
}