May 08, 2021 AngularJS
The AngularJS form is a collection of input controls.
The following HTML input elements are called HTML controls:
HTML forms typically exist at the same time as HTML controls.
function ExampleController($scope) { $scope.master = {"firstName":"John","lastName":"Doe"}; $ scope.reset = function() { $scope.user = angular.copy($scope.master); } ; $ scope.reset(); } ;
form = {{user}}
master = {{master}}
The HTML property novalidate is used to disable the browser's default authentication. |
The AngularJS ng-model instruction is used to bind input elements into the model.
The value of the model object master is "firstName": "John", "lastName": "Doe".
The model function reset sets the model object user equal to master.