JSFiddle - React, Tailwind, and code Playground

by IgorMinar

HTML

<script type="text/javascript" ng:autobind
src="http://code.angularjs.org/angular-0.10.1.js"></script>

<div ng:controller="Ctrl"> 
        {{items}}
        Alter the input box or uncomment the code to see the change:
        <input type="text" name="txt"/> <br/>
</div>

JavaScript

function Ctrl($resource){

    var self = this;
    self.show_target = false;
    
    this.items= ["a","b","c","d","e"];
   
      
    self.ChangeStuff = function(){
      
         setTimeout(function(){
             self.$apply(function() {
               self.items= ["f","g","h","i","j"];
             });
        }, 0);
           
    }
        
   this.ChangeStuff();
};