JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app>
    <div ng-controller="FelineCtrl">
        <input type="text" ng-model="catName" />
        <br />
        Edit Count: {{editCount}}
    </div>
</div>

JavaScript

function FelineCtrl($scope) {
    $scope.catName = 'Le cat';
    //Set catName to 'not dirty here'
    $scope.editCount = 0;
    $scope.$watch('catName', function (newValue, oldValue) {
        if(oldValue === newValue){
            return;
        }
        $scope.editCount = $scope.editCount + 1;
    })
}