Skip to content

Instantly share code, notes, and snippets.

@hyperqube
Created July 23, 2012 18:53
Show Gist options
  • Save hyperqube/3165400 to your computer and use it in GitHub Desktop.
Save hyperqube/3165400 to your computer and use it in GitHub Desktop.
Emberjs Binding
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'
});
// Later, after Ember has resolved bindings...
MyApp.country.get('presidentName');
// "Barack Obama"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment