AbstractFormGroupDirective
class
A base class for code shared between the NgModelGroup
and FormGroupName
directives.
class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { control: FormGroup path: string[] formDirective: Form | null validator: ValidatorFn | null asyncValidator: AsyncValidatorFn | null ngOnInit(): void ngOnDestroy(): void // inherited from forms/ControlContainer name: string | number | null formDirective: Form | null path: string[] | null // inherited from forms/AbstractControlDirective abstract control: AbstractControl | null value: any valid: boolean | null invalid: boolean | null pending: boolean | null disabled: boolean | null enabled: boolean | null errors: ValidationErrors | null pristine: boolean | null dirty: boolean | null touched: boolean | null status: string | null untouched: boolean | null statusChanges: Observable<any> | null valueChanges: Observable<any> | null path: string[] | null reset(value: any = undefined): void hasError(errorCode: string, path?: string | (string | number)[]): boolean getError(errorCode: string, path?: string | (string | number)[]): any }
Subclasses
Properties
Property | Description |
---|---|
control: FormGroup |
Read-Only The |
path: string[] |
Read-Only The path to this group from the top-level directive. |
formDirective: Form | null |
Read-Only The top-level directive for this group if present, otherwise null. |
validator: ValidatorFn | null |
Read-Only The synchronous validators registered with this group. |
asyncValidator: AsyncValidatorFn | null |
Read-Only The async validators registered with this group. |
Methods
ngOnInit() |
---|
An internal callback method triggered on the instance after the inputs are set. Registers the group with its parent group. |
|
ngOnDestroy() |
---|
An internal callback method triggered before the instance is destroyed. Removes the group from its parent group. |
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/forms/AbstractFormGroupDirective