Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
AngularJS – ng-keydown Directive
The ng-keydown directive in AngularJS basically specifies a custom event on pressing the
Syntax
..content..
Example − ngKeydown Directive
Create a file "ngKeydown.html" in your Angular project directory and copy-paste the following code snippet.
ngKeydown Directive Welcome to Tutorials Point
AngularJS | ngKeydown Directive
Enter Name:
Output
To run the above code, just go to your file and run it as a normal HTML file.
On keyDown −
Example 2
Create a file "ngKeydown.html" in your Angular project directory and copy-paste the following code snippet.
ngKeydown Directive Welcome to Tutorials Point
AngularJS | ngKeydown Directive
key down count: {{count}}
Output
To run the above code, just go to your file and run it as a normal HTML file.
Will count the occurrence of keydown events −
Advertisements
