AngularJs ng-keyup event example


AngularJs ng-keyup event example : AngularJs ng-keyup event binds keyup event with elements in html.


Syntax : AngularJs ng-keyup event

The below example shows the ng-keyup event directive.

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
</head>

<body>
<div ng-app="" ng-init="i=0">
    <input type="text" ng-keyup="i = i+1" placeholder="Type something...">
     Counter = {{i}}
</div>
</body>
</html>

Try it »

AngularJs ng-keyup event example

AngularJs ng-keyup event example


Advertisements

Add Comment

📖 Read More