WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-keydown Directive


Example

Execute an articulation at each keystroke:

<input ng-keydown="count = check + 1" ng-init="count=0"/>

<h1>{{count}}</h1>
Try it yourself »

Definition and Usage

The ng-keydown mandate instructs AngularJS when the console is utilized on the particular HTML element.

The ng-keydown mandate from AngularJS won't abrogate the component's unique onkeydown occasion, both will be executed.

The request of a key stroke is:

1. Keydown

2. Keypress

3. Keyup


Syntax

<element ng-keydown="expression"></element>

Supported by <input>, <select>, <textarea>, and other editable elements.


Parameter Values

Value Description
expression An articulation to execute when a key is pressed.