Skip to content

Instantly share code, notes, and snippets.

@kidGodzilla
Last active April 12, 2016 06:30
Show Gist options
  • Save kidGodzilla/294b86e50f08f369bbe4d6812d4c7ae5 to your computer and use it in GitHub Desktop.
Save kidGodzilla/294b86e50f08f369bbe4d6812d4c7ae5 to your computer and use it in GitHub Desktop.
Binding
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<h3>Two-way Binding</h3>
<p>Try typing in the box below. Because the value attribute of the input helper is live bound to the `appName` property, the title in the welcome message will change as you type.</p>
<br>
<br>
{{input value=appName}}
{
"version": "0.7.2",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment