2015-07-27 22:12:30 -07:00
p.location-badge.
exported from <a href='../forms'>angular2/forms</a>
2015-09-01 13:55:47 -07:00
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/forms/directives/ng_model.ts#L13-L75">angular2/src/forms/directives/ng_model.ts (line 13)</a>
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
This module is used for handling user input, by defining and building a <a href='ControlGroup-class.html'><code>ControlGroup</code></a> that
consists of
<a href='Control-class.html'><code>Control</code></a> objects, and mapping them onto the DOM. <a href='Control-class.html'><code>Control</code></a> objects can then be used
to read information
from the form DOM elements.
2015-07-27 22:12:30 -07:00
2015-09-01 13:55:47 -07:00
This module is not included in the `angular2` module; you must import the forms module
explicitly.
2015-07-28 13:28:47 -07:00
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({
selector: '[ng-model]:not([ng-control]):not([ng-form-control])',
2015-08-02 23:08:36 -07:00
bindings: [formControlBinding],
2015-07-28 13:28:47 -07:00
properties: ['model: ngModel'],
events: ['update: ngModel'],
2015-09-01 13:55:47 -07:00
lifecycle: [LifecycleEvent.OnChanges],
2015-07-28 13:28:47 -07:00
exportAs: 'form'
})
2015-07-27 22:12:30 -07:00
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(ngValidators: QueryList<NgValidator>)
:markdown
.l-sub-section
h3 update
:markdown
.l-sub-section
h3 model
:markdown
.l-sub-section
h3 viewModel
:markdown
.l-sub-section
h3 ngValidators
:markdown
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 onChanges
2015-07-27 22:12:30 -07:00
pre.prettyprint
code.
2015-09-01 13:55:47 -07:00
onChanges(c: StringMap<string, any>)
2015-07-27 22:12:30 -07:00
:markdown
.l-sub-section
h3 control
:markdown
.l-sub-section
h3 path
:markdown
.l-sub-section
h3 validator
:markdown
.l-sub-section
h3 viewToModelUpdate
pre.prettyprint
code.
viewToModelUpdate(newValue: any)
:markdown