JSFiddle - React, Tailwind, and code Playground

by dmarko484

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
    <script src="http://code.jquery.com/jquery-1.7.1.js"></script>
    <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.js"></script>
    <script src="http://docs-next.angularjs.org/angular-0.10.6.min.js"></script>

  <body  ng:app ng:controller="MCtrl">
    <div class="container-fluid">
      <aside class="sidebar">
        some kind of menu
        <ul>
          <li>item1</li>
        </ul>
      </aside>
      <article class="content">
        <h2>Hello {{username}}  {{aaa+"---"+x()}}!</h2>
       <div ng:repeat='item in items'>
           <div>ID:{{item.id}}<br />
               <input type='text' ng:model='item.text'  ng:required />
               <input type='checkbox' ng:model='item.done'> hotovo
           </div>    
       </div>
           
          
          <a href ng:click="addItem()">add item</a> ||   <a href ng:click="removeItem()">remove item</a>
          <br />
          seznam položek v poli:
          {{items}}
          
      </article>
    </div>

   
  </body>

JavaScript

MCtrl.$inject = ['$route']
    
function MCtrl($route) {
    this.items=[
    {'id':'ASASWERFG','text':'popis telefonátu', 'done':true},
    {'id':'POIKUJZTRT','text':'popis telefonátu2', 'done':false}
    ];

    
    //var $scope=this;
    
    $route.when("/welcome",  {template:'./examples/welcome.html',  controller:MCtrl});
    // $route.when("/settings", {template:'./examples/settings.html', controller:MainCtrl});
    // $route.parent(this);
    
    this.x=function(){
       return "ahoj";
    }
    
    this.aaa='David3';
    this.username = 'Ferdo Mravec';
    
    this.changeName = function(name) {
       this.username = name;
    }
        
    this.addItem=function(){
      alert('ssss');
    }
}
    
// remove item  
MCtrl.prototype.removeItem=function(){
   alert('remove')
}