feat(forms): clear (remove all) components from a FormArray (#28918)
This method is a more convenient and efficient way of removing all components from a FormArray. Before it, we needed to loop the FormArray removing each component until empty. Resolves #18531 PR Close #28918
This commit is contained in:

committed by
Kara Erickson

parent
014841dfef
commit
a68b1a1894
1
tools/public_api_guard/forms/forms.d.ts
vendored
1
tools/public_api_guard/forms/forms.d.ts
vendored
@ -170,6 +170,7 @@ export declare class FormArray extends AbstractControl {
|
||||
readonly length: number;
|
||||
constructor(controls: AbstractControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
at(index: number): AbstractControl;
|
||||
clear(): void;
|
||||
getRawValue(): any[];
|
||||
insert(index: number, control: AbstractControl): void;
|
||||
patchValue(value: any[], options?: {
|
||||
|
Reference in New Issue
Block a user