Skip to content

Instantly share code, notes, and snippets.

@GavinJoyce
Last active February 7, 2016 22:40
Show Gist options
  • Save GavinJoyce/eb938858c52e645005d8 to your computer and use it in GitHub Desktop.
Save GavinJoyce/eb938858c52e645005d8 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
enabled: false,
trueValue: 'T',
falseValue: 'F'
});
<h1>concat with inline if</h1>
T:{{input value=trueValue}}<br />
F:{{input value=falseValue}}<br />
<hr />
toggle: {{input type="checkbox" checked=enabled}}<br />
{{concat 'the answer is:' (if enabled trueValue falseValue)}}
<br>
<br>
{
"version": "0.5.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.2.0/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment