emberjs/website — Issue #32: Adding Ember.run.sync() to Bindings Example on the Website
Author: frodsan
Created: 2012-01-14 04:59:12+00:00
State: open

Hi! A friend told me in the morning that he had problems
with the binding examples on the website, it would be
great if we can add some explanation to `Ember.run.sync()`

```javascript
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'
});

// This forces the bindings synchronization:
Ember.run.sync();

MyApp.country.get('presidentName');
// "Barack Obama"
```