Skip to content

Instantly share code, notes, and snippets.

@morhook
Last active January 5, 2017 21:02
Show Gist options
  • Save morhook/6461bc11e4cb740f12d7111315792c98 to your computer and use it in GitHub Desktop.
Save morhook/6461bc11e4cb740f12d7111315792c98 to your computer and use it in GitHub Desktop.
double checkbox
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
runit() {
console.log(this.get('chequeado'));
},
checkedToggle() {
this.set('isChecked', true);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<input type="checkbox" name="asdf" onclick={{action "checkedToggle"}} checked={{isChecked}} />
<input type="checkbox" name="asdf" onclick={{action "checkedToggle"}} checked={{isChecked}} />
<button onclick={{action "runit"}}>
debug it
</button>
{{outlet}}
<br>
<br>
{
"version": "0.10.7",
"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.10.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment