AngularJS

AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng keypress Directive

AngularJS ng-keypress Directive

 

 

The ng-keypress directive is used to tell AngularJS what to do when the keyboard event key press has occurred on the specific HTML element. It will not override the default onkeypress event and both will be executed.

 

Order of keystroke will be:-

 

  1. keydown
  2. keypress
  3. keyup

 

Syntax:-

 

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

 

Further Explanation:-

 

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

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS