Skip to content

Instantly share code, notes, and snippets.

@ryanlabouve
Created December 30, 2016 03:44
Show Gist options
  • Select an option

  • Save ryanlabouve/266cef95964fa5674fbf6cd9c5499c2d to your computer and use it in GitHub Desktop.

Select an option

Save ryanlabouve/266cef95964fa5674fbf6cd9c5499c2d to your computer and use it in GitHub Desktop.
Kata 4a
import Ember from 'ember';
export default Ember.Controller.extend({
lights: false,
actions: {
toggleLightsOnOff() {
this.toggleProperty('lights');
}
}
});
The lights are {{if lights 'on' 'off'}}
<br>
Light switch:
<input type="checkbox"
onchange={{action 'toggleLightsOnOff'}}>
{
"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