Form

Stable Interface

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
}

Interface Description

An interface that FormGroupDirective and NgForm implement.

Only used by the forms module.

Interface Details

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.

exported from @angular/forms/index, defined in @angular/forms/src/directives/form_interface.ts

doc_Angular
2016-10-06 09:46:29
Comments
Leave a Comment

Please login to continue.