Skip to content

Instantly share code, notes, and snippets.

@tobiasWenger
Created March 14, 2017 13:48
Show Gist options
  • Save tobiasWenger/332e405b55d3e9a11c0dc75ce5aa5f91 to your computer and use it in GitHub Desktop.
Save tobiasWenger/332e405b55d3e9a11c0dc75ce5aa5f91 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
selected: '',
actions: {
selectOnchange(value) {
this.set('selected', value);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<select onchange={{action 'selectOnchange' value='target.value'}}>
<option value=1>option 1</option>
<option value=2>option 2</option>
</select>
<br>
<br>
selected: {{selected}}
{
"version": "0.11.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.11.0",
"ember-data": "2.11.0",
"ember-template-compiler": "2.11.0",
"ember-testing": "2.11.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment