Reputation: 6127
With something like the following how can I determine which of the three properties has changed without resorting to something tedious like printing out all the values each time, or creating three separate observers?
variableObserver: Ember.observer('variable.{name,value,type}', function() {
// which property changed?
}),
Upvotes: 0
Views: 151
Reputation: 8751
You can do using arguments
array.
variableObserver : Ember.observer('variable.{name,value,type}',function(){
this.set("changedvalue",arguments[1]);
}),
Added an example Ember Twiddle
Upvotes: 1