What I want to know is how to do this How can an observer find out the before and after values of the observed property in Ember.js? with the last version of Ember.JS.
Now beforeObserver and observer send only 'this'(the object that is watching) and the the query. Here and example.
fooWillChange: function() {
console.log(
arguments.length, //2
arguments[0] == this, //true
arguments[1] == 'foo' //true
);
}.observesBefore('foo'),
fooDidChange: function() {
//exactly equal fooWillChange
}.observes('foo')
in 'foo' case I can just pick the value with get
but in the case of watching a property inside of an array(like bar.@each.name
) this won't work.