Skip to content

Instantly share code, notes, and snippets.

@optikalefx
Created July 14, 2017 12:16
Show Gist options
  • Save optikalefx/74234a329c26256eb1b8eae4646f8049 to your computer and use it in GitHub Desktop.
Save optikalefx/74234a329c26256eb1b8eae4646f8049 to your computer and use it in GitHub Desktop.
event test
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Twiddle',
inputValue: 'test',
aFunction(val) {
console.log(this.get('inputValue'));
},
actions: {
update() {
console.log(event);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{Twiddle}}
<button {{action 'update'}} >click me</button>
<input type="text" value={{inputValue}} oninput={{action (mut inputValue) value=target.value}}/>
<br>
<br>
{
"version": "0.12.1",
"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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment