Skip to content

Instantly share code, notes, and snippets.

@jgwhite
Last active March 17, 2017 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgwhite/868a0682063383f59768c59b739d5514 to your computer and use it in GitHub Desktop.
Save jgwhite/868a0682063383f59768c59b739d5514 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export function not([arg]/*, hash*/) {
return !arg;
}
export default Ember.Helper.helper(not);
<input disabled={{isDisabled}} placeholder="Hello">
<button onclick={{action (mut isDisabled) (not isDisabled)}}>
{{if isDisabled "Enable" "Disable"}}
</button>
{
"version": "0.11.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.11.0",
"ember-data": "2.11.0",
"ember-template-compiler": "2.11.0",
"ember-testing": "2.11.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment