Skip to content

Instantly share code, notes, and snippets.

@eddie-ruva
Created February 1, 2017 22:10
Show Gist options
  • Save eddie-ruva/130364bfdbf44e6f40d8a47cc0164c9e to your computer and use it in GitHub Desktop.
Save eddie-ruva/130364bfdbf44e6f40d8a47cc0164c9e to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
currentValue: 'Initial value',
actions: {
myAction(inputValue) {
console.log(event);
this.set('currentValue', inputValue);
}
}
});
<h1>Welcome to {{appName}}</h1>
{{currentValue}}
<input type="text"
value={{currentValue}}
onchange={{action "myAction" value="target.value"}} >
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.2",
"ember-data": "2.11.0",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment