* Constructs a new `FormArray` from the given array of configurations, * validators and options. Accepts a single generic argument, which is the type of each control * inside the array. * * @param controls An array of child controls or control configs. Each child control is given an *
(
controls: Array<T>,
validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,
asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,
)
| 398 | * @param asyncValidator A single async validator or array of async validator functions. |
| 399 | */ |
| 400 | array<T>( |
| 401 | controls: Array<T>, |
| 402 | validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, |
| 403 | asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null, |
| 404 | ): FormArray<ɵElement<T, null>> { |
| 405 | const createdControls = controls.map((c) => this._createControl(c)); |
| 406 | // Cast to `any` because the inferred types are not as specific as Element. |
| 407 | return new FormArray(createdControls, validatorOrOpts, asyncValidator) as any; |
| 408 | } |
| 409 | |
| 410 | /** @internal */ |
| 411 | _reduceControls<T>(controls: { |
no test coverage detected