Angularjs form
The Angularjs form is a collection of input controls.
HTML Control
The following HTML INPUT element is called an HTML control:
Input Element
Select Element
button Element
textarea Element
HTML form
HTML forms typically exist at the same time as HTML controls.
ANGULARJS form Instances
The Name:
Last Name:
RESET
form = {"FirstName": "John", "LastName": "Doe"}
Master = {"FirstName": "John", "LastName": "Doe"}
Application code:
Run Result:
The Name:
Last Name:
RESET
form = {"FirstName": "John", "LastName": "Doe"}
Master = {"FirstName": "John", "LastName": "Doe"}
Note: The Novalidate property is added in HTML5. Default authentication using the browser is disabled.
Instance resolution
The ng-app directive defines the ANGULARJS application.
The ng-controller directive defines the application controller.
The ng-model directive binds two input elements to the model's user object.
The Formctrl function sets the initial value of the Master object and defines the reset () method.
The Reset () method sets the user object equal to the Master object.
The ng-click instruction calls the Reset () method and is invoked when the button is clicked.
The Novalidate attribute is not required in the application, but you need to use it in the Angularjs form to override the standard HTML5 validation.
The above is the Angularjs form data collation, follow-up continue to supplement, hope to help programming students.