AbstractFormGroupDirective

This is a base class for code shared between NgModelGroup and FormGroupName.

class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { get control: FormGroup get path: string[] get formDirective: Form | null get validator: ValidatorFn | null get asyncValidator: AsyncValidatorFn | null ngOnInit(): void ngOnDestroy(): void // 继承自 forms/ControlContainer name: string get formDirective: Form | null get path: string[] | null // 继承自 forms/AbstractControlDirective abstract get control: AbstractControl | null get value: any get valid: boolean | null get invalid: boolean | null get pending: boolean | null get disabled: boolean | null get enabled: boolean | null get errors: ValidationErrors | null get pristine: boolean | null get dirty: boolean | null get touched: boolean | null get status: string | null get untouched: boolean | null get statusChanges: Observable<any> | null get valueChanges: Observable<any> | null get path: string[] | null reset(value: any = undefined): void hasError(errorCode: string, path?: string[]): boolean getError(errorCode: string, path?: string[]): any }

属性

属性名类型说明
control只读

Get the FormGroup backing this binding.

path只读

Get the path to this control group.

formDirective只读

Get the Form to which this group belongs.

validator只读
asyncValidator只读

方法

ngOnInit(): void

参数

没有参数。

返回值

void

ngOnDestroy(): void

参数

没有参数。

返回值

void