Home » AngularJS ng-keyup Directive

AngularJS ng-keyup Directive

by Online Tutorials Library

AngularJS ng-keyup Directive

The AngularJS ng-keyup directive specifies the custom behavior of AngularJS when you leave a key after pressing on the keyboard for a specific HTML element.

Following is the order of a key stroke:

  • Keydown
  • Keypress
  • Keyup

It is supported by &ltinput>, &ltselect>, &lttextarea>, and other editable elements.

Syntax:

Parameter explanation:

expression: It specifies an expression that is executed when you leave a key after pressing it on keyboard.

Let’s take an example to demonstrate the usage of ng-keyup directive.

See this example:

Test it Now

You may also like