Skip to content

Instantly share code, notes, and snippets.

@joostdevries
Last active August 29, 2015 14:17
Show Gist options
  • Save joostdevries/202e3ab3483386daacd2 to your computer and use it in GitHub Desktop.
Save joostdevries/202e3ab3483386daacd2 to your computer and use it in GitHub Desktop.
Ember Twiddle sample
<h1>Ember Twiddle Gist demo</h1>
{{outlet}}
<h2 style="color:red;">{{yield}}</h2>
import Ember from 'ember';
export default Em.Controller.extend({
userName: null,
prettyUserName: function() {
return this.get('userName') ? this.get('userName') : 'everyone';
}.property('userName')
});
<h3>Hi {{controller.prettyUserName}}!</h3>
{{input value=controller.userName placeholder="Your name"}}
{{#big-red-text}}All the magic happens in your browser{{/big-red-text}}
body{font-family:Arial; color: #666;}
h1 {font-size:18px;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment