An interface implemented by FormGroupDirective and NgForm directives.
API
interface Form {
addControl(dir: NgControl): void;
removeControl(dir: NgControl): void;
getControl(dir: NgControl): FormControl<any>;
addFormGroup(dir: AbstractFormGroupDirective): void;
removeFormGroup(dir: AbstractFormGroupDirective): void;
getFormGroup(dir: AbstractFormGroupDirective): FormGroup<any>;
updateModel(dir: NgControl, value: any): void;
}
addControl
voidAdd a control to this form.
@returns
void
removeControl
voidRemove a control from this form.
@returns
void
getControl
FormControl<any>The control directive from which to get the FormControl.
@returns
FormControl<any>
addFormGroup
voidAdd a group of controls to this form.
@returns
void
removeFormGroup
voidRemove a group of controls to this form.
@returns
void
getFormGroup
FormGroup<any>The FormGroup associated with a particular AbstractFormGroupDirective.
@returns
FormGroup<any>
updateModel
voidUpdate the model for a particular control with a new value.
@paramvalue
any: The new value for the control.
@returns
void
Description
An interface implemented by FormGroupDirective and NgForm directives.
Only used by the ReactiveFormsModule and FormsModule.