Form
interface
npm Package | @angular/forms |
---|---|
Module | import { Form } from '@angular/forms'; |
Source | forms/src/directives/form_interface.ts |
Interface Overview
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 }
Description
An interface that FormGroupDirective
and NgForm
implement.
Only used by the forms module.
Members
addControl(dir: NgControl): void
Add a control to this form.
removeControl(dir: NgControl): void
Remove a control from this form.
getControl(dir: NgControl): FormControl
Look up the FormControl
associated with a particular NgControl
.
addFormGroup(dir: AbstractFormGroupDirective): void
Add a group of controls to this form.
removeFormGroup(dir: AbstractFormGroupDirective): void
Remove a group of controls from this form.
getFormGroup(dir: AbstractFormGroupDirective): FormGroup
Look up the FormGroup
associated with a particular AbstractFormGroupDirective
.
updateModel(dir: NgControl, value: any): void
Update the model for a particular control with a new value.
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/forms/Form