YouTip LogoYouTip

Ng Ng Keydown

# AngularJS `ng-keydown` Directive [![Image 3: AngularJS Reference Manual](#) AngularJS Reference Manual](#) * * * ## AngularJS Example Code executed when a key is pressed:

{{count}}

[Try it Β»](#) * * * ## Definition and Usage The **ng-keydown** directive is used to tell AngularJS what operation to perform when a key is pressed on a specified HTML element. The **ng-keydown** directive does not override the element's native onkeydown event. When the event is triggered, both the **ng-keydown** expression and the native onkeydown event will be executed. The order of key press events: 1. Keydown 2. Keypress 3. Keyup * * * ## Syntax , ,