JSFiddle - React, Tailwind, and code Playground
by Abdull
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.js"></script>
<script src="https://s3.amazonaws.com/builds.emberjs.com/ember-latest.js"></script>
<script src="https://s3.amazonaws.com/builds.emberjs.com/ember-data-latest.js"></script>
<body>
<!-- Also OK: <script type="text/x-handlebars"> -->
<script type="text/x-handlebars" id="application">
This is the application template.<br/>
{{outlet}}
</script>
<script type="text/x-handlebars" id="index">
This is the index template.<br/>
Lame property: {{lameProperty}}<br/>
<img {{bindAttr src="awesome"}} />
</script>
</body>
JavaScript
Ember.LOG_BINDINGS = true;
App = Ember.Application.create({
LOG_TRANSITIONS: true,
});
App.IndexController = Ember.ObjectController.extend({
/*ununcomment me */
lameProperty: "yolo",
awesome: "http://i.imgur.com/MpTn2b4.jpg",
// */
/*uncomment me *
lameProperty: function() {
return "swag";
},
awesome: function() {
return "http://i.imgur.com/KzpE9.jpg";
},
*/
});