JSFiddle - React, Tailwind, and code Playground

by santhosh lanka

HTML

<div ngApp= "myApp">

<div ng-controller="MyCtrl">
    <input type="text" ng-model="foo" placeholder="Enter something" />
    <input type="button" ng-click="doSomething()" value="Send" ng-disabled="foo == null" />
</div>

</div>

JavaScript

var myApp = angular.module('myApp', []);

function MyCtrl($scope) {
    $scope.foo = null;
    $scope.doSomething = function () {
        console.log("Hello, " + $scope.foo);
    }
}