Skip to content

Instantly share code, notes, and snippets.

@locks
Created December 14, 2015 23:47
Show Gist options
  • Save locks/b3826f6a511b76f83d0b to your computer and use it in GitHub Desktop.
Save locks/b3826f6a511b76f83d0b to your computer and use it in GitHub Desktop.
if
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
show: false,
actions: {
toggle() {
this.toggleProperty('show');
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<button {{action 'toggle'}}>{{if show 'hide' 'show'}}
</button>
<br>
<br>
{
"version": "0.4.17",
"EmberENV": {
"FEATURES": {}
},
"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