Skip to content

Instantly share code, notes, and snippets.

@zackthehuman
Last active November 14, 2016 22:35
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 zackthehuman/e7fe133367d79a77cdca0ad721d601bd to your computer and use it in GitHub Desktop.
Save zackthehuman/e7fe133367d79a77cdca0ad721d601bd to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
noteError: false,
actions: {
toggle() { this.toggleProperty('noteError'); }
}
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
.error {
background: red;
}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{textarea
classNames="ham--sandwich"
classNameBindings="noteError:error"
value=noteError
}}
{{textarea
id="add-note__textarea"
classNames="add-note__textarea"
classNameBindings="noteError:error"
value=noteError
rows="4"
placeholder="i18n_leave_a_note"
required=true
}}
<button {{action 'toggle'}}>toggle</button>
<br>
<br>
{
"version": "0.10.6",
"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.5.1",
"ember-data": "2.9.0",
"ember-template-compiler": "2.5.1",
"ember-testing": "2.5.1"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment