<!DOCTYPE html>
<html>
<head>
<title> Wikitechy AngularJS Tutorials</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js">
</script>
</head>
<body>
<h2> ng-change() Directive in AngularJS Tutorials</h2>
<div ng-app="myApp" ng-controller="myCtrl">
<lable>Enter the text</lable>
<input type="text" ng-change="changeFunc()" ng-model="myValue">
<h3>The input field has been changed {{count}} times.</h3>
</div>
<script>
angular.module('myApp', [])
.controller('myCtrl', ['$scope', function($scope) {
$scope.count = 0;
$scope.changeFunc = function() {
$scope.count++;
};
}]);
</script>
</body>
</html>