JSFiddle - React, Tailwind, and code Playground

by rishi007bansod

HTML

<div ng-app="myApp" ng-controller="dummy">
    <form name="myform">
        <input type="text" ng-model="message1" />
        <input type="text" ng-model="message2" />
    </form>
    <p>
        <textarea id="textarea1" cols="80" rows="10" ng-model="myTextArea">
            </textarea>
    </p>
    <p>
        <button ng-click="save()">Save</button>
        <button ng-click="clear()">Clear</button>
    </p>
    </form>
</div>

JavaScript

angular.module('myApp', [])
    .controller('dummy', ['$scope', function ($scope) {
        $scope.tt = "uuuu";
    $scope.$watch("tt", function (newVal, oldVal) {
        if (newVal !== oldVal) {
            $scope.myTextArea = "This is "+newVal+" in 1st line";
        }
    });
                  
    $scope.save = function () {
        console.log($scope.myTextArea);
    };
}]);