Skip to content

Instantly share code, notes, and snippets.

@locks
Created February 27, 2018 16:22
Show Gist options
  • Save locks/1c3bc8fb995e5028130ecfcbd3fd7e91 to your computer and use it in GitHub Desktop.
Save locks/1c3bc8fb995e5028130ecfcbd3fd7e91 to your computer and use it in GitHub Desktop.
input action
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
test() {
console.log("action");
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
1. {{input value=appName action="test" on="keyPress"}}
2. {{input value=appName action="test" on="key-press"}}
4. {{input value=appName key-press="test"}}
<br>
<br>
{
"version": "0.13.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": "1.11.3",
"ember-template-compiler": "1.11.3",
"ember-testing": "1.11.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment