Skip to content

Instantly share code, notes, and snippets.

@iheanyi
Forked from locks/application.controller.js
Created May 1, 2016 00:11
Show Gist options
  • Save iheanyi/1a9790a3ef441e5ea79f4b71aa55ae03 to your computer and use it in GitHub Desktop.
Save iheanyi/1a9790a3ef441e5ea79f4b71aa55ae03 to your computer and use it in GitHub Desktop.
Native Input
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
actions: {
hello(firstArg, { target: { value } }) {
console.log(value);
console.log(arguments);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<input onkeyup={{action (action 'hello' 1)}}>
<input onkeyup={{action (mut appName) value="target.value"}}>
<br>
<br>
{
"version": "0.5.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"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.2.0/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.2.0/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment