AngularJS ng-model
Directive
AngularJS Example
Bind the value of an input field to a scope variable:
Definition and Usage
The ng-model directive binds the HTML form element to the scope variable.
If the variable does not exist in the scope, it will be created.
Syntax
<input>, <select>, <textarea> elements support this directive.
Parameter Values
Value | Description |
---|---|
variable | The name of the property you want to bind to the form field. |