Skip to content

Instantly share code, notes, and snippets.

@GavinJoyce
Created January 30, 2018 15:20
Show Gist options
  • Save GavinJoyce/37c69ab584ae65f9f67e166ff8a0812d to your computer and use it in GitHub Desktop.
Save GavinJoyce/37c69ab584ae65f9f67e166ff8a0812d to your computer and use it in GitHub Desktop.
with helper and false
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
isSelected: true
});
isSelected: {{isSelected}}<hr>
{{#with isSelected as |isItSelected|}}
isItSelected: {{isItSelected}}
{{/with}}
<hr />
<button onclick={{action (mut isSelected) false}}>
FALSE
</button>
<button onclick={{action (mut isSelected) true}}>
TRUE
</button>
{
"version": "0.13.0",
"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.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment