Reputation: 328
Upgrading to last version of ember (1.0.0-rc.8) i found a difference on resolution of bindings and they are not working properly. This is the example:
App.ApplicationController = Ember.Controller.extend({
exploration: Em.Object.create({
activeUser: Em.Object.create(),
}),
});
App.PageController = Ember.Controller.extend(
{
needs: ['application'],
explorationBinding: 'controllers.application.exploration',
}
if i try to get the property exploration by:
result = pageController.get('exploration')
the result is null
. Instead if I try to get
result = pageController.get('controllers.application.exploration')
the result is the instance of exploration object.
Is a Bug or a normal behavior?
UPDATE The problem is resolved upgrading to last release 1.0.0 (31/08/2013) and was connected to the Issue 3265
Upvotes: 1
Views: 360
Reputation: 7458
There are a couple of small issues about binding order. But basically bindings are being semi-deprecated in favour of CPs
So your controller should look like:
App.PageController = Ember.Controller.extend({
needs: ['application'],
exploration: Ember.computed.alias('controllers.application.exploration')
})
Upvotes: 1