Form

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 forms-index, defined in forms/src/directives/form_interface.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/forms/index/Form-interface.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部