JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="MyApp">
    <div ng-controller="MyCtrl">Enter some text:
        <input type="text" ng-model="text" size="30" />
        <p>You entered: {{text}}</p>
        <p>Length: {{textLength}}</p>
    </div>
</div>

JavaScript

angular.module('MyApp', []).controller(
    'MyCtrl', function ($scope) {
    $scope.text = '';
    $scope.textLength = 0;
    $scope.$watch('text', function (value) {
        $scope.textLength = value.length;
    });
});