feat(forms): formGroupName and formArrayName also accepts a number (#32607)

For consistency, `FormGroupName` and `FormaArrayName` also accepts a
number as input's type like `FormControlName`

Closes https://github.com/angular/angular/issues/32436

PR Close #32607
This commit is contained in:
LASLEDJ
2019-09-10 22:39:47 +02:00
committed by Alex Rickabaugh
parent 3efb060127
commit fee28e20bb
4 changed files with 29 additions and 17 deletions

View File

@ -128,7 +128,7 @@ export declare const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
export declare abstract class ControlContainer extends AbstractControlDirective {
readonly formDirective: Form | null;
name: string;
name: string | number | null;
readonly path: string[] | null;
}
@ -194,7 +194,7 @@ export declare class FormArrayName extends ControlContainer implements OnInit, O
readonly asyncValidator: AsyncValidatorFn | null;
readonly control: FormArray;
readonly formDirective: FormGroupDirective | null;
name: string;
name: string | number | null;
readonly path: string[];
readonly validator: ValidatorFn | null;
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
@ -322,7 +322,7 @@ export declare class FormGroupDirective extends ControlContainer implements Form
}
export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
name: string;
name: string | number | null;
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
}