[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/forms/Form [Back]  [Original]

Form Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/forms

Form

interface
stable

An interface implemented by FormGroupDirective and NgForm directives.

On this page

    arrow_upward_alt Back to the top

    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

    void

    Add a control to this form.

    @paramdirNgControl

    The control directive to add to the form.

    @returnsvoid

    removeControl

    void

    Remove a control from this form.

    @paramdirNgControl

    : The control directive to remove from the form.

    @returnsvoid

    getControl

    FormControl<any>

    The control directive from which to get the FormControl.

    @paramdirNgControl

    : The control directive.

    @returnsFormControl<any>

    addFormGroup

    void

    Add a group of controls to this form.

    @paramdirAbstractFormGroupDirective

    : The control group directive to add.

    @returnsvoid

    removeFormGroup

    void

    Remove a group of controls to this form.

    @paramdirAbstractFormGroupDirective

    : The control group directive to remove.

    @returnsvoid

    getFormGroup

    FormGroup<any>

    The FormGroup associated with a particular AbstractFormGroupDirective.

    @paramdirAbstractFormGroupDirective

    : The form group directive from which to get the FormGroup.

    @returnsFormGroup<any>

    updateModel

    void

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

    @paramdirNgControl

    : The control directive to update.

    @paramvalueany

    : The new value for the control.

    @returnsvoid

    Description

    An interface implemented by FormGroupDirective and NgForm directives.

    Only used by the ReactiveFormsModule and FormsModule.

    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page