emberjs/ember.js — Issue #397: Problems with Bindings Example in Website Documentation
Author: frodsan
Created: 2012-01-13 23:02:23+00:00
State: open

Hi, i'm trying the bindings code example in this JSFiddle: http://jsfiddle.net/frodsan/wfeXY/

```javascript
window.MyApp = Ember.Application.create();

MyApp.president = Ember.Object.create({
name: "Barack Obama"
});

MyApp.country = Ember.Object.create({
// Ending a property with 'Binding' tells Ember to
// create a binding to the presidentName property.
presidentNameBinding: 'MyApp.president.name'
});

console.log(MyApp.country.get('presidentName'));
// undefined

console.log(MyApp.president.get('name'));
// "Barack Obama"
```

Why `MyApp.country.get('presidentName')` returns `undefined`?