ng model Directive in AngularJS
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data. It is a two-way binding i.e, If the user changes the value inside the input field, the AngularJS property will also change its value.
The purposes of ng-model directives are:-
Validate User Input i.e, this directive can provide type validation for application data.
Application Status i.e, this directive can provide status for application data.
CSS Classes i.e, this directive provides CSS classes for HTML elements.
The ng-model directive adds/removes the following classes:-
< element ng-model="name" >< /element >
|name||The name of the property you want to bind to the form field.|