angular-cn/public/docs/js/latest/api/forms/NgFormControl-class.jade

176 lines
2.3 KiB
Plaintext
Raw Normal View History

p.location-badge.
exported from <a href='../forms'>angular2/forms</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/forms/directives/ng_form_control.ts#L14-L104">angular2/src/forms/directives/ng_form_control.ts (line 14)</a>
:markdown
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.
This module is not included in the `angular2` module; you must import the forms module
explicitly.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({
selector: &#39;[ng-form-control]&#39;,
bindings: [formControlBinding],
properties: [&#39;form: ngFormControl&#39;, &#39;model: ngModel&#39;],
events: [&#39;update: ngModel&#39;],
lifecycle: [LifecycleEvent.OnChanges],
exportAs: &#39;form&#39;
})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(ngValidators: QueryList&lt;NgValidator&gt;)
:markdown
.l-sub-section
h3 form
: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
h3 onChanges
pre.prettyprint
code.
onChanges(c: StringMap&lt;string, any&gt;)
:markdown
.l-sub-section
h3 path
:markdown
.l-sub-section
h3 control
:markdown
.l-sub-section
h3 validator
:markdown
.l-sub-section
h3 viewToModelUpdate
pre.prettyprint
code.
viewToModelUpdate(newValue: any)
:markdown