Ngkeydown/ngkeypress/ngkeyup
The instruction executes the specified expression when the key press/Key Press/Key is released.
Ngkeydown and ngkeypress slightly different, the current test is ngkeypress for the system button is not valid, and Ngkeydown can.
The Ngkeyup command executes when the key is released.
Using code:
<Inputng-keydown= "Count = Count + 1" Ng-init=" count=0 " >{{count}} < Input ng-keypress= "Count = Count + 1" Ng-init= "count=0" > {{count}} <input Span style= "color: #ff0000;" >ng-keyup= "Count = Count + 1" Ng-init= "count=0" >{{count}}
Ngmousedown/ngmouseenter/ngmouseleave/ngmousemove/ngmouseover/ngmouseup
The instruction executes the specified expression when the mouse is pressed/the mouse enters/the mouse is left/the mouse moves/the mouse is on the top/mouse is released.
Using code:
<buttonNg-mousedown= "Count = Count + 1"Ng-init= "Count=0">on Mouse Down</button>{{count}}<buttonNg-mouseenter= "Count = Count + 1"Ng-init= "Count=0">when Mouse Enter</button>{{count}}<buttonNg-mouseleave= "Count = Count + 1"Ng-init= "Count=0">when Mouse Leave</button>{{count}}<buttonNg-mousemove= "Count = Count + 1"Ng-init= "Count=0">when Mouse Move</button>{{count}}<button = "Count = Count + 1" Ng-init= "count=0" >when Mouse is Over</button>{{count}} <button ng-mouseup Ng-init=" count=0 ">on mouse Up</button >{{count}}
I didn't want to write these instructions, after all, it was a little bit simpler ... then think back, maybe sometimes the project needs to be used, or the use of these instructions is summed up ....
Angular--ngkeydown/ngkeypress/ngkeyup keyboard events and mouse events