Form interface

An interface implemented by FormGroupDirective and NgForm directives.

Only used by the ReactiveFormsModule and FormsModule.

Interface

addControl#

addControl(dir: NgControl): void

Add a control to this form.

removeControl#

removeControl(dir: NgControl): void

Remove a control from this form.

getControl#

getControl(dir: NgControl): FormControl

The control directive from which to get the FormControl.

addFormGroup#

addFormGroup(dir: AbstractFormGroupDirective): void

Add a group of controls to this form.

removeFormGroup#

removeFormGroup(dir: AbstractFormGroupDirective): void

Remove a group of controls to this form.

getFormGroup#

getFormGroup(dir: AbstractFormGroupDirective): FormGroup

The FormGroup associated with a particular AbstractFormGroupDirective.

updateModel#

updateModel(dir: NgControl, value: any): void

Update the model for a particular control with a new value.