JSFiddle - React, Tailwind, and code Playground

by Luqman Rom

HTML

<div ng-app="myApp">
    <div ng-controller="test">
        <button ng-if="!show" ng-click="toggleShow()">show me</button>
        <div ng-show="show">
            <textarea ng-model="cancelMessage" ></textarea>
<span > {{100 - cancelMessage.length}} characters remaining</span>

            <button ng-click="clickTest()">clickTest</button>
        </div>
    </div>
</div>

JavaScript

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

myApp.controller('test', function ($scope) {
    $scope.show = false;
    $scope.cancelMessage = '';
    $scope.clickTest = function () {
        alert($scope.cancelMessage);
    };
    $scope.toggleShow = function () {
        $scope.show = !$scope.show;
    }
});