Form
interface
An interface implemented by FormGroupDirective
and NgForm
directives.
interface Form {
addControl(dir: NgControl): void
removeControl(dir: NgControl): void
getControl(dir: NgControl): FormControl
addFormGroup(dir: AbstractFormGroupDirective): void
removeFormGroup(dir: AbstractFormGroupDirective): void
getFormGroup(dir: AbstractFormGroupDirective): FormGroup
updateModel(dir: NgControl, value: any): void
}
Class implementations
NgForm
FormGroupDirective
Description
Only used by the ReactiveFormsModule
and FormsModule
.
Methods
addControl() | |||
---|---|---|---|
Add a control to this form. | |||
addControl(dir: NgControl): voidParameters
Returns
|
removeControl() | |||
---|---|---|---|
Remove a control from this form. | |||
removeControl(dir: NgControl): voidParameters
Returns
|
getControl() | |||
---|---|---|---|
The control directive from which to get the FormControl .
| |||
getControl(dir: NgControl): FormControlParameters
Returns
|
addFormGroup() | |||
---|---|---|---|
Add a group of controls to this form. | |||
addFormGroup(dir: AbstractFormGroupDirective): voidParameters
Returns
|
removeFormGroup() | |||
---|---|---|---|
Remove a group of controls to this form. | |||
removeFormGroup(dir: AbstractFormGroupDirective): voidParameters
Returns
|
getFormGroup() | |||
---|---|---|---|
The FormGroup associated with a particular AbstractFormGroupDirective .
| |||
getFormGroup(dir: AbstractFormGroupDirective): FormGroupParameters
Returns
|
updateModel() | ||||||
---|---|---|---|---|---|---|
Update the model for a particular control with a new value. | ||||||
updateModel(dir: NgControl, value: any): voidParameters
Returns
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/forms/Form