JSFiddle - React, Tailwind, and code Playground

by pangratz666

HTML

<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.7.1.js"></script>
<script type="text/x-handlebars">
    {{view Ember.TextField
        valueBinding="App.tempObj.hold"
        disabledBinding="App.controller.shouldDisable"}} {{App.tempObj.hold}}
    <hr/>
</script>

JavaScript

App = Em.Application.create();

App.controller = Em.Object.create({
    shouldDisable: true
});

App.tempObj = Em.Object.create({
    hold: "initial value"
});

// just to illustrate how to define bindings outside of templates,
// we're adding a TextField with bindings setup the same as for the
// template
Ember.TextField.create({
    valueBinding: 'App.tempObj.hold',
    disabledBinding: 'App.controller.shouldDisable'
}).appendTo('body');

// if you trigger Ember.js specific code, you'd want
// to use Ember.run.later instead of setTimeout
Ember.run.later(function() {
    console.log('timer tick');
    App.controller.set('shouldDisable', false);
}, 3000);