Skip to content

Instantly share code, notes, and snippets.

@buschtoens
Created October 19, 2017 14:56
Show Gist options
  • Save buschtoens/579bc6cef0e8e6b4ef9ec4ada3498a3f to your computer and use it in GitHub Desktop.
Save buschtoens/579bc6cef0e8e6b4ef9ec4ada3498a3f to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
foo: true,
bar: true,
actions: {
toggle(key) {
this.toggleProperty(key);
}
}
});
<button {{action "toggle" "foo"}}>
Toggle foo
</button>
<button {{action "toggle" "bar"}}>
Toggle bar
</button>
<br>
{{#with foo bar as |_foo _bar|}}
{{_foo}}
{{_bar}}
{{/with}}
{
"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