Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kumkanillam/df8f3f7f4c81d27e4d10afa93629cd89 to your computer and use it in GitHub Desktop.
Save kumkanillam/df8f3f7f4c81d27e4d10afa93629cd89 to your computer and use it in GitHub Desktop.
Input Example
import Ember from 'ember';
export default Ember.TextField.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
width:100,
actions:{
setWidth(){
console.log(" width ",this.get("width"));
}
}
});
<h1>Welcome to {{appName}}</h1>
{{outlet}}
<form {{action 'setWidth' on='submit'}}>
{{input-helper type="text" value=width class="form-control" style="width:50px; color:black"}}
</form>
<!-- Console.log shows only the value 100 after change to 200-->
<!-- Possible to use two-way-bindings with component values?-->
<!-- I Have to use the input-helper component, because i have to use styles-->
{
"version": "0.10.7",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js",
"ember": "2.9.1",
"ember-data": "beta",
"ember-template-compiler": "2.9.1",
"ember-testing": "2.9.1"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment