What about a Ember.bindObjects?

Hi everyone,

while developing an app using Ember I faced a regular problem. At some point, I create two objects and I want to synchronize a property of the first object to a property of the second object. To do this, I use the great function addObserver to get my object’s properties sync. The drawback is that I have to manually remove the observers when leaving the route and it’s sometimes hard to find out the complete list of those observers.

I can’t use the great Ember.bind() because the second object is not relative to the first one even if one depends on the existence of the other.

So I way thinking of adding a new binding method which could look like that:

Ember.bindObjects(toObj, toPath, fromObj, fromPath);
Ember.bindObjects(toObj, toPath, fromObj, fromPath).oneWay();

Do you think it is relevant ? Do you need more information ?

P.S: this is linked to https://github.com/emberjs/ember.js/issues/5066