JSFiddle - React, Tailwind, and code Playground
by igalst
HTML
<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min.js"></script>
<script type='text/x-handlebars' data-template-name='talk-button'>
<a href="#" {{action "sayIt" on="click"}}>Say it</a><br />
</script>
JavaScript
App = Ember.Application.create({});
App.TalkButton = Ember.View.extend({
templateName: "talk-button",
sayIt: function() {
alert(this.get("words"));
}
});
var stupid = App.TalkButton.create({
words: "I have nothing smart to say"
});
var smart = App.TalkButton.create({
words: "I'm smart and I know it"
});
stupid.append();
smart.append();