Angularjs ng-focus Instruction
Angularjs instance
Executes an expression when the input box gets the focus:
When the instance gets the focus each time in the input box, the calculated variable "Count" is automatically added to 1.
Definitions and usage
The ng-focus directive is used to tell angularjs what action needs to be performed when the HTML element gets the focus.
The ng-focus directive does not overwrite the original onfocus event of the element, and the Ng-focus expression and the original onfocus event are executed when the event is triggered.
Grammar
<element ng-focus= "expression" ></element>
<a>, <input>, <select>, <textarea>, and window objects all support the directive.
Parameter values
value |
Description |
Expression |
The expression to execute when the element gets the focus. |
The above is the angular ng-focus basic data collation, follow-up continue to add.