JSFiddle - React, Tailwind, and code Playground

by skane

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.2/ember.min.js"></script>
<script type="text/x-handlebars">
    It's alive!
    {{timeStamp}}
    {{outlet}}
</script>

JavaScript

App=Ember.Application.create();

App.ApplicationController = Ember.Controller.extend({
    timeStamp : null,
    
    init: function() {
        this._super();
        Ember.run.later(this, this.updateCounter, 1000);
    },
    
    updateCounter : function () {
        if (this.get('timeStamp') < 100) {
            this.incrementProperty('timeStamp', 10);
            Ember.run.later(this, this.updateCounter, 1000);
        }
    },
});