Skip to content

Instantly share code, notes, and snippets.

@feanor07
Created December 20, 2016 17:46
Show Gist options
  • Save feanor07/40a276757e4a9995b3405ec7e65efe5f to your computer and use it in GitHub Desktop.
Save feanor07/40a276757e4a9995b3405ec7e65efe5f to your computer and use it in GitHub Desktop.
Input Example 1
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
width:100,
actions:{
setWidth(value){
console.log(value);
}
}
});
<h1>Welcome to {{appName}}</h1>
{{outlet}}
<form {{action 'setWidth' width on='submit'}}>
{{input value=width class="form-control"}}
</form>
{
"version": "0.10.7",
"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.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment