export directive NgFormControl
export directive NgFormControl
exported from angular2/common defined in angular2/src/common/forms/directives/ng_form_control.ts (line 28)
Binds an existing Control
to a DOM element.
Example (live demo)
In this example, we bind the control to an input element. When the value of the input element changes, the value of the control will reflect that change. Likewise, if the value of the control changes, the input element reflects that change.
###ngModel
We can also use ngModel
to bind a domain model to the form.
Example (live demo)
Selectors
[ngFormControl]
Inputs
ng-form-control
bound to NgFormControl.form
ng-model
bound to NgFormControl.model
Outputs
ng-model-change
bound to NgFormControl.update
Exported As
ngForm
Constructor
constructor(_validators:
/* Array<Validator|Function> */ any[], _asyncValidators:
/* Array<Validator|Function> */ any[], valueAccessors: ControlValueAccessor[])
constructor(_validators:
/* Array<Validator|Function> */ any[], _asyncValidators:
/* Array<Validator|Function> */ any[], valueAccessors: ControlValueAccessor[])
Not Yet Documented
Members
form : Control
form : Control
Not Yet Documented
update : EventEmitter
update : EventEmitter
Not Yet Documented
model : any
model : any
Not Yet Documented
viewModel : any
viewModel : any
Not Yet Documented
ngOnChanges(changes: {[key: string]: SimpleChange}) : void
ngOnChanges(changes: {[key: string]: SimpleChange}) : void
Not Yet Documented
path : string[]
path : string[]
Not Yet Documented
validator : Function
validator : Function
Not Yet Documented
asyncValidator : Function
asyncValidator : Function
Not Yet Documented
control : Control
control : Control
Not Yet Documented
viewToModelUpdate(newValue: any) : void
viewToModelUpdate(newValue: any) : void
Not Yet Documented