@rxap/forms
Version:
This package provides a set of tools and directives to simplify working with Angular forms, including reactive forms, custom validators, and form directives for handling loading, submitting, and error states. It offers decorators for defining forms and co
2,042 lines (1,111 loc) • 64.7 kB
Markdown
[@rxap/forms](../wiki/globals) / RxapFormArray
# Class: RxapFormArray\<T, E, Parent\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:55](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L55)
## Extends
- `UntypedFormArray`
## Type Parameters
• **T** = `any`
• **E** *extends* `object` = `any`
• **Parent** *extends* `object` = `any`
## Implements
- [`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`[]\>
## Constructors
### new RxapFormArray()
> **new RxapFormArray**\<`T`, `E`, `Parent`\>(`controls`, `options`): [`RxapFormArray`](../wiki/Class.RxapFormArray)\<`T`, `E`, `Parent`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:131](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L131)
#### Parameters
##### controls
[`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>[]
##### options
[`FormArrayOptions`](../wiki/Interface.FormArrayOptions)
#### Returns
[`RxapFormArray`](../wiki/Class.RxapFormArray)\<`T`, `E`, `Parent`\>
#### Overrides
`UntypedFormArray.constructor`
## Properties
### controlId
> `readonly` **controlId**: `string`
Defined in: [packages/angular/forms/src/lib/form-array.ts:118](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L118)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`controlId`](../wiki/Interface.AbstractControl#controlid)
***
### controls
> **controls**: [`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>[]
Defined in: [packages/angular/forms/src/lib/form-array.ts:132](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L132)
#### Inherited from
`UntypedFormArray.controls`
***
### dirty$
> `readonly` **dirty$**: `Observable`\<`boolean`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:124](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L124)
***
### disabled$
> `readonly` **disabled$**: `Observable`\<`boolean`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:112](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L112)
***
### enabled$
> `readonly` **enabled$**: `Observable`\<`boolean`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:114](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L114)
***
### errors
> `readonly` **errors**: `null` \| `E`
Defined in: [packages/angular/forms/src/lib/form-array.ts:115](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L115)
An object containing any errors generated by failing validation,
or null if there are no errors.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`errors`](../wiki/Interface.AbstractControl#errors)
#### Overrides
`UntypedFormArray.errors`
***
### errors$
> `readonly` **errors$**: `Observable`\<`null` \| `E`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:117](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L117)
***
### events
> `readonly` **events**: `Observable`\<`ControlEvent`\<`any`\>\>
Defined in: node\_modules/@angular/forms/index.d.ts:2278
A multicasting observable that emits an event every time the state of the control changes.
It emits for value, status, pristine or touched changes.
**Note**: On value change, the emit happens right after a value of this control is updated. The
value of a parent control (for example if this FormControl is a part of a FormGroup) is updated
later, so accessing a value of a parent control (using the `value` property) from the callback
of this event might result in getting a value that has not been updated yet. Subscribe to the
`events` of the parent control instead.
For other event types, the events are emitted after the parent control has been updated.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`events`](../wiki/Interface.AbstractControl#events)
#### Inherited from
`UntypedFormArray.events`
***
### status
> `readonly` **status**: [`ControlState`](../wiki/TypeAlias.ControlState)
Defined in: [packages/angular/forms/src/lib/form-array.ts:111](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L111)
The validation status of the control.
#### See
FormControlStatus
These status values are mutually exclusive, so a control cannot be
both valid AND invalid or invalid AND disabled.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`status`](../wiki/Interface.AbstractControl#status)
#### Overrides
`UntypedFormArray.status`
***
### status$
> `readonly` **status$**: `Observable`\<[`ControlState`](../wiki/TypeAlias.ControlState)\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:116](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L116)
***
### statusChanges
> `readonly` **statusChanges**: `Observable`\<[`ControlState`](../wiki/TypeAlias.ControlState)\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:113](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L113)
A multicasting observable that emits an event every time the validation `status` of the control
recalculates.
#### See
- FormControlStatus
- [AbstractControl.status](../wiki/Interface.AbstractControl#status)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`statusChanges`](../wiki/Interface.AbstractControl#statuschanges)
#### Overrides
`UntypedFormArray.statusChanges`
***
### touch$
> `readonly` **touch$**: `Observable`\<`boolean`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:120](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L120)
***
### value
> `readonly` **value**: `T`[]
Defined in: [packages/angular/forms/src/lib/form-array.ts:95](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L95)
The current value of the control.
* For a `FormControl`, the current value.
* For an enabled `FormGroup`, the values of enabled controls as an object
with a key-value pair for each member of the group.
* For a disabled `FormGroup`, the values of all controls as an object
with a key-value pair for each member of the group.
* For a `FormArray`, the values of enabled controls as an array.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`value`](../wiki/Interface.AbstractControl#value)
#### Overrides
`UntypedFormArray.value`
***
### value$
> `readonly` **value$**: `Observable`\<`T`[]\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:109](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L109)
***
### valueChanges
> `readonly` **valueChanges**: `Observable`\<`T`[]\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:107](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L107)
A multicasting observable that emits an event every time the value of the control changes, in
the UI or programmatically. It also emits an event each time you call enable() or disable()
without passing along {emitEvent: false} as a function argument.
**Note**: the emit happens right after a value of this control is updated. The value of a
parent control (for example if this FormControl is a part of a FormGroup) is updated later, so
accessing a value of a parent control (using the `value` property) from the callback of this
event might result in getting a value that has not been updated yet. Subscribe to the
`valueChanges` event of the parent control instead.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`valueChanges`](../wiki/Interface.AbstractControl#valuechanges)
#### Overrides
`UntypedFormArray.valueChanges`
## Accessors
### asyncValidator
#### Get Signature
> **get** **asyncValidator**(): `null` \| `AsyncValidatorFn`
Defined in: node\_modules/@angular/forms/index.d.ts:2161
Returns the function that is used to determine the validity of this control asynchronously.
If multiple validators have been added, this will be a single composed function.
See `Validators.compose()` for additional information.
##### Returns
`null` \| `AsyncValidatorFn`
#### Set Signature
> **set** **asyncValidator**(`asyncValidatorFn`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2162
##### Parameters
###### asyncValidatorFn
`null` | `AsyncValidatorFn`
##### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`asyncValidator`](../wiki/Interface.AbstractControl#asyncvalidator)
#### Inherited from
`UntypedFormArray.asyncValidator`
***
### controlPath
#### Get Signature
> **get** **controlPath**(): `string`
Defined in: [packages/angular/forms/src/lib/form-array.ts:81](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L81)
##### Returns
`string`
***
### dirty
#### Get Signature
> **get** **dirty**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2249
A control is `dirty` if the user has changed the value
in the UI.
##### Returns
`boolean`
True if the user has changed the value of this control in the UI; compare `pristine`.
Programmatic changes to a control's value do not mark it dirty.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`dirty`](../wiki/Interface.AbstractControl#dirty)
#### Inherited from
`UntypedFormArray.dirty`
***
### disabled
#### Get Signature
> **get** **disabled**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2216
A control is `disabled` when its `status` is `DISABLED`.
Disabled controls are exempt from validation checks and
are not included in the aggregate value of their ancestor
controls.
##### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
##### Returns
`boolean`
True if the control is disabled, false otherwise.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`disabled`](../wiki/Interface.AbstractControl#disabled)
#### Inherited from
`UntypedFormArray.disabled`
***
### enabled
#### Get Signature
> **get** **enabled**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2226
A control is `enabled` as long as its `status` is not `DISABLED`.
##### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
##### Returns
`boolean`
True if the control has any status other than 'DISABLED',
false if the status is 'DISABLED'.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`enabled`](../wiki/Interface.AbstractControl#enabled)
#### Inherited from
`UntypedFormArray.enabled`
***
### fullControlPath
#### Get Signature
> **get** **fullControlPath**(): `string`
Defined in: [packages/angular/forms/src/lib/form-array.ts:97](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L97)
##### Returns
`string`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`fullControlPath`](../wiki/Interface.AbstractControl#fullcontrolpath)
***
### invalid
#### Get Signature
> **get** **invalid**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2195
A control is `invalid` when its `status` is `INVALID`.
##### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
##### Returns
`boolean`
True if this control has failed one or more of its validation checks,
false otherwise.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`invalid`](../wiki/Interface.AbstractControl#invalid)
#### Inherited from
`UntypedFormArray.invalid`
***
### length
#### Get Signature
> **get** **length**(): `number`
Defined in: node\_modules/@angular/forms/index.d.ts:1153
Length of the control array.
##### Returns
`number`
#### Inherited from
`UntypedFormArray.length`
***
### parent
#### Get Signature
> **get** **parent**(): `null` \| `FormGroup`\<`any`\> \| `FormArray`\<`any`\>
Defined in: node\_modules/@angular/forms/index.d.ts:2166
The parent control.
##### Returns
`null` \| `FormGroup`\<`any`\> \| `FormArray`\<`any`\>
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`parent`](../wiki/Interface.AbstractControl#parent)
#### Inherited from
`UntypedFormArray.parent`
***
### pending
#### Get Signature
> **get** **pending**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2204
A control is `pending` when its `status` is `PENDING`.
##### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
##### Returns
`boolean`
True if this control is in the process of conducting a validation check,
false otherwise.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`pending`](../wiki/Interface.AbstractControl#pending)
#### Inherited from
`UntypedFormArray.pending`
***
### pristine
#### Get Signature
> **get** **pristine**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2239
A control is `pristine` if the user has not yet changed
the value in the UI.
##### Returns
`boolean`
True if the user has not yet changed the value in the UI; compare `dirty`.
Programmatic changes to a control's value do not mark it dirty.
#### Set Signature
> **set** **pristine**(`value`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2240
##### Parameters
###### value
`boolean`
##### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`pristine`](../wiki/Interface.AbstractControl#pristine)
#### Inherited from
`UntypedFormArray.pristine`
***
### readonly
#### Get Signature
> **get** **readonly**(): `boolean`
Defined in: [packages/angular/forms/src/lib/form-array.ts:63](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L63)
##### Returns
`boolean`
#### Set Signature
> **set** **readonly**(`value`): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:67](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L67)
##### Parameters
###### value
`boolean`
##### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`readonly`](../wiki/Interface.AbstractControl#readonly)
***
### root
#### Get Signature
> **get** **root**(): `AbstractControl`
Defined in: node\_modules/@angular/forms/index.d.ts:2758
Retrieves the top-level ancestor of this control.
##### Returns
`AbstractControl`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`root`](../wiki/Interface.AbstractControl#root)
#### Inherited from
`UntypedFormArray.root`
***
### rxapFormDefinition
#### Get Signature
> **get** **rxapFormDefinition**(): `undefined` \| `Partial`\<[`FormDefinition`](../wiki/Interface.FormDefinition)\<`Parent`, `any`, `any`\>\> & \{ \[K in string \| number \| symbol\]: Parent\[K\] extends U\[\] ? FormDefinitionArray\<FormType\<U\>\> \| FormDefinitionArray\<RxapFormControl\<U, any, any\>\> \| RxapFormArray\<U, any, any\> \| RxapFormControl\<any\[any\], any, any\> : Parent\[K\] extends Record\<string, any\> ? Partial\<FormDefinition\<any\[any\], any, any\>\> & \{ \[K in string \| number \| symbol\]: any\[any\]\[K\] extends U\[\] ? FormDefinitionArray\<(...)\> \| FormDefinitionArray\<(...)\> \| RxapFormArray\<(...), (...), (...)\> \| RxapFormControl\<(...), (...), (...)\> : (...)\[(...)\] extends Record\<(...), (...)\> ? (...) \| (...) : RxapFormControl\<(...), (...), (...)\> \} & Partial\<FormDefinition\<any\[any\], any, any\>\> \| RxapFormControl\<any\[any\], any, any\> : RxapFormControl\<NonEmpty\<Parent\[K\]\>, any, any\> \} & [`FormDefinition`](../wiki/Interface.FormDefinition)\<`Parent`, `any`, `any`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:75](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L75)
**`Internal`**
##### Returns
`undefined` \| `Partial`\<[`FormDefinition`](../wiki/Interface.FormDefinition)\<`Parent`, `any`, `any`\>\> & \{ \[K in string \| number \| symbol\]: Parent\[K\] extends U\[\] ? FormDefinitionArray\<FormType\<U\>\> \| FormDefinitionArray\<RxapFormControl\<U, any, any\>\> \| RxapFormArray\<U, any, any\> \| RxapFormControl\<any\[any\], any, any\> : Parent\[K\] extends Record\<string, any\> ? Partial\<FormDefinition\<any\[any\], any, any\>\> & \{ \[K in string \| number \| symbol\]: any\[any\]\[K\] extends U\[\] ? FormDefinitionArray\<(...)\> \| FormDefinitionArray\<(...)\> \| RxapFormArray\<(...), (...), (...)\> \| RxapFormControl\<(...), (...), (...)\> : (...)\[(...)\] extends Record\<(...), (...)\> ? (...) \| (...) : RxapFormControl\<(...), (...), (...)\> \} & Partial\<FormDefinition\<any\[any\], any, any\>\> \| RxapFormControl\<any\[any\], any, any\> : RxapFormControl\<NonEmpty\<Parent\[K\]\>, any, any\> \} & [`FormDefinition`](../wiki/Interface.FormDefinition)\<`Parent`, `any`, `any`\>
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`rxapFormDefinition`](../wiki/Interface.AbstractControl#rxapformdefinition)
***
### touched
#### Get Signature
> **get** **touched**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2256
True if the control is marked as `touched`.
A control is marked `touched` once the user has triggered
a `blur` event on it.
##### Returns
`boolean`
#### Set Signature
> **set** **touched**(`value`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2257
##### Parameters
###### value
`boolean`
##### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`touched`](../wiki/Interface.AbstractControl#touched)
#### Inherited from
`UntypedFormArray.touched`
***
### untouched
#### Get Signature
> **get** **untouched**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2265
True if the control has not been marked as touched
A control is `untouched` if the user has not yet triggered
a `blur` event on it.
##### Returns
`boolean`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`untouched`](../wiki/Interface.AbstractControl#untouched)
#### Inherited from
`UntypedFormArray.untouched`
***
### updateOn
#### Get Signature
> **get** **updateOn**(): `FormHooks`
Defined in: node\_modules/@angular/forms/index.d.ts:2305
Reports the update strategy of the `AbstractControl` (meaning
the event on which the control updates itself).
Possible values: `'change'` | `'blur'` | `'submit'`
Default value: `'change'`
##### Returns
`FormHooks`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`updateOn`](../wiki/Interface.AbstractControl#updateon)
#### Inherited from
`UntypedFormArray.updateOn`
***
### valid
#### Get Signature
> **get** **valid**(): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2186
A control is `valid` when its `status` is `VALID`.
##### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
##### Returns
`boolean`
True if the control has passed all of its validation tests,
false otherwise.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`valid`](../wiki/Interface.AbstractControl#valid)
#### Inherited from
`UntypedFormArray.valid`
***
### validator
#### Get Signature
> **get** **validator**(): `null` \| `ValidatorFn`
Defined in: node\_modules/@angular/forms/index.d.ts:2154
Returns the function that is used to determine the validity of this control synchronously.
If multiple validators have been added, this will be a single composed function.
See `Validators.compose()` for additional information.
##### Returns
`null` \| `ValidatorFn`
#### Set Signature
> **set** **validator**(`validatorFn`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2155
##### Parameters
###### validatorFn
`null` | `ValidatorFn`
##### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`validator`](../wiki/Interface.AbstractControl#validator)
#### Inherited from
`UntypedFormArray.validator`
## Methods
### addAsyncValidators()
> **addAsyncValidators**(`validators`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2352
Add an asynchronous validator or validators to this control, without affecting other
validators.
When you add or remove a validator at run time, you must call
`updateValueAndValidity()` for the new validation to take effect.
Adding a validator that already exists will have no effect.
#### Parameters
##### validators
The new asynchronous validator function or functions to add to this control.
`AsyncValidatorFn` | `AsyncValidatorFn`[]
#### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`addAsyncValidators`](../wiki/Interface.AbstractControl#addasyncvalidators)
#### Inherited from
`UntypedFormArray.addAsyncValidators`
***
### addValidators()
> **addValidators**(`validators`): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2340
Add a synchronous validator or validators to this control, without affecting other validators.
When you add or remove a validator at run time, you must call
`updateValueAndValidity()` for the new validation to take effect.
Adding a validator that already exists will have no effect. If duplicate validator functions
are present in the `validators` array, only the first instance would be added to a form
control.
#### Parameters
##### validators
The new validator function or functions to add to this control.
`ValidatorFn` | `ValidatorFn`[]
#### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`addValidators`](../wiki/Interface.AbstractControl#addvalidators)
#### Inherited from
`UntypedFormArray.addValidators`
***
### at()
> **at**(`index`): [`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>
Defined in: [packages/angular/forms/src/lib/form-array.ts:146](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L146)
Get the `AbstractControl` at the given `index` in the array.
#### Parameters
##### index
`number`
Index in the array to retrieve the control. If `index` is negative, it will wrap
around from the back, and if index is greatly negative (less than `-length`), the result is
undefined. This behavior is the same as `Array.at(index)`.
#### Returns
[`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>
#### Overrides
`UntypedFormArray.at`
***
### clear()
> **clear**(`options`?): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:1321
Remove all controls in the `FormArray`.
#### Parameters
##### options?
Specifies whether this FormArray instance should emit events after all
controls are removed.
* `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
`valueChanges` observables emit events with the latest status and value when all controls
in this FormArray instance are removed. When false, no events are emitted.
###### emitEvent?
`boolean`
#### Returns
`void`
#### Usage Notes
### Remove all elements from a FormArray
```ts
const arr = new FormArray([
new FormControl(),
new FormControl()
]);
console.log(arr.length); // 2
arr.clear();
console.log(arr.length); // 0
```
It's a simpler and more efficient alternative to removing all elements one by one:
```ts
const arr = new FormArray([
new FormControl(),
new FormControl()
]);
while (arr.length) {
arr.removeAt(0);
}
```
#### Inherited from
`UntypedFormArray.clear`
***
### clearAsyncValidators()
> **clearAsyncValidators**(): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2443
Empties out the async validator list.
When you add or remove a validator at run time, you must call
`updateValueAndValidity()` for the new validation to take effect.
#### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`clearAsyncValidators`](../wiki/Interface.AbstractControl#clearasyncvalidators)
#### Inherited from
`UntypedFormArray.clearAsyncValidators`
***
### clearValidators()
> **clearValidators**(): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2435
Empties out the synchronous validator list.
When you add or remove a validator at run time, you must call
`updateValueAndValidity()` for the new validation to take effect.
#### Returns
`void`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`clearValidators`](../wiki/Interface.AbstractControl#clearvalidators)
#### Inherited from
`UntypedFormArray.clearValidators`
***
### disable()
> **disable**(`opts`?): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2580
Disables the control. This means the control is exempt from validation checks and
excluded from the aggregate value of any parent. Its status is `DISABLED`.
If the control has children, all children are also disabled.
#### Parameters
##### opts?
Configuration options that determine how the control propagates
changes and emits events after the control is disabled.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `statusChanges`,
`valueChanges` and `events`
observables emit events with the latest status and value when the control is disabled.
When false, no events are emitted.
###### emitEvent?
`boolean`
###### onlySelf?
`boolean`
#### Returns
`void`
#### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`disable`](../wiki/Interface.AbstractControl#disable)
#### Inherited from
`UntypedFormArray.disable`
***
### disabledWhile()
> **disabledWhile**(`observable`, `options`?): `Subscription`
Defined in: [packages/angular/forms/src/lib/form-array.ts:207](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L207)
#### Parameters
##### observable
`Observable`\<`boolean`\>
##### options?
[`ControlOptions`](../wiki/Interface.ControlOptions)
#### Returns
`Subscription`
***
### enable()
> **enable**(`opts`?): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2602
Enables the control. This means the control is included in validation checks and
the aggregate value of its parent. Its status recalculates based on its value and
its validators.
By default, if the control has children, all children are enabled.
#### Parameters
##### opts?
Configure options that control how the control propagates changes and
emits events when marked as untouched
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `statusChanges`,
`valueChanges` and `events`
observables emit events with the latest status and value when the control is enabled.
When false, no events are emitted.
###### emitEvent?
`boolean`
###### onlySelf?
`boolean`
#### Returns
`void`
#### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`enable`](../wiki/Interface.AbstractControl#enable)
#### Inherited from
`UntypedFormArray.enable`
***
### enabledWhile()
> **enabledWhile**(`observable`, `options`?): `Subscription`
Defined in: [packages/angular/forms/src/lib/form-array.ts:214](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L214)
#### Parameters
##### observable
`Observable`\<`boolean`\>
##### options?
[`ControlOptions`](../wiki/Interface.ControlOptions)
#### Returns
`Subscription`
***
### get()
#### Call Signature
> **get**\<`P`\>(`path`): `null` \| `AbstractControl`\<`ɵGetProperty`\<`any`, `P`\>, `ɵGetProperty`\<`any`, `P`\>\>
Defined in: node\_modules/@angular/forms/index.d.ts:2688
Retrieves a child control given the control's name or path.
This signature for get supports strings and `const` arrays (`.get(['foo', 'bar'] as const)`).
##### Type Parameters
• **P** *extends* `string` \| readonly (`string` \| `number`)[]
##### Parameters
###### path
`P`
##### Returns
`null` \| `AbstractControl`\<`ɵGetProperty`\<`any`, `P`\>, `ɵGetProperty`\<`any`, `P`\>\>
##### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`get`](../wiki/Interface.AbstractControl#get)
##### Inherited from
`UntypedFormArray.get`
#### Call Signature
> **get**\<`P`\>(`path`): `null` \| `AbstractControl`\<`ɵGetProperty`\<`any`, `P`\>, `ɵGetProperty`\<`any`, `P`\>\>
Defined in: node\_modules/@angular/forms/index.d.ts:2695
Retrieves a child control given the control's name or path.
This signature for `get` supports non-const (mutable) arrays. Inferred type
information will not be as robust, so prefer to pass a `readonly` array if possible.
##### Type Parameters
• **P** *extends* `string` \| (`string` \| `number`)[]
##### Parameters
###### path
`P`
##### Returns
`null` \| `AbstractControl`\<`ɵGetProperty`\<`any`, `P`\>, `ɵGetProperty`\<`any`, `P`\>\>
##### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`get`](../wiki/Interface.AbstractControl#get)
##### Inherited from
`UntypedFormArray.get`
***
### getError()
> **getError**\<`K`\>(`errorCode`, `path`?): `null` \| `E`\[`K`\]
Defined in: [packages/angular/forms/src/lib/form-array.ts:411](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L411)
#### Type Parameters
• **K** *extends* `string`
#### Parameters
##### errorCode
`K`
The code of the error to check
##### path?
[`ControlPath`](../wiki/TypeAlias.ControlPath)
A list of control names that designates how to move from the current control
to the control that should be queried for errors.
#### Returns
`null` \| `E`\[`K`\]
error data for that particular error. If the control or error is not present,
null is returned.
#### Description
Reports error data for the control with the given path.
#### Usage Notes
For example, for the following `FormGroup`:
```ts
form = new FormGroup({
address: new FormGroup({ street: new FormControl() })
});
```
The path to the 'street' control from the root form would be 'address' -> 'street'.
It can be provided to this method in one of two formats:
1. An array of string control names, e.g. `['address', 'street']`
1. A period-delimited list of control names in one string, e.g. `'address.street'`
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`getError`](../wiki/Interface.AbstractControl#geterror)
#### Overrides
`UntypedFormArray.getError`
***
### getRawValue()
> **getRawValue**(): `T`[]
Defined in: [packages/angular/forms/src/lib/form-array.ts:150](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L150)
The aggregate value of the array, including any disabled controls.
Reports all values regardless of disabled status.
#### Returns
`T`[]
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`getRawValue`](../wiki/Interface.AbstractControl#getrawvalue)
#### Overrides
`UntypedFormArray.getRawValue`
***
### hasAsyncValidator()
> **hasAsyncValidator**(`validator`): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2427
Check whether an asynchronous validator function is present on this control. The provided
validator must be a reference to the exact same function that was provided.
#### Parameters
##### validator
`AsyncValidatorFn`
The asynchronous validator to check for presence. Compared by function
reference.
#### Returns
`boolean`
Whether the provided asynchronous validator was found on this control.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`hasAsyncValidator`](../wiki/Interface.AbstractControl#hasasyncvalidator)
#### Inherited from
`UntypedFormArray.hasAsyncValidator`
***
### hasError()
> **hasError**(`errorCode`, `path`?): `boolean`
Defined in: [packages/angular/forms/src/lib/form-array.ts:403](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L403)
#### Parameters
##### errorCode
`Extract`\<keyof `E`\>
The code of the error to check
##### path?
[`ControlPath`](../wiki/TypeAlias.ControlPath)
A list of control names that designates how to move from the current control
to the control that should be queried for errors.
#### Returns
`boolean`
whether the given error is present in the control at the given path.
If the control is not present, false is returned.
#### Description
Reports whether the control with the given path has the error specified.
#### Usage Notes
For example, for the following `FormGroup`:
```ts
form = new FormGroup({
address: new FormGroup({ street: new FormControl() })
});
```
The path to the 'street' control from the root form would be 'address' -> 'street'.
It can be provided to this method in one of two formats:
1. An array of string control names, e.g. `['address', 'street']`
1. A period-delimited list of control names in one string, e.g. `'address.street'`
If no path is given, this method checks for the error on the current control.
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`hasError`](../wiki/Interface.AbstractControl#haserror)
#### Overrides
`UntypedFormArray.hasError`
***
### hasErrorAndDirty()
> **hasErrorAndDirty**(`errorCode`, `path`?): `boolean`
Defined in: [packages/angular/forms/src/lib/form-array.ts:317](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L317)
#### Parameters
##### errorCode
[`ExtractStrings`](../wiki/TypeAlias.ExtractStrings)\<`E`\>
##### path?
[`ControlPath`](../wiki/TypeAlias.ControlPath)
#### Returns
`boolean`
***
### hasErrorAndTouched()
> **hasErrorAndTouched**(`errorCode`, `path`?): `boolean`
Defined in: [packages/angular/forms/src/lib/form-array.ts:265](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L265)
#### Parameters
##### errorCode
[`ExtractStrings`](../wiki/TypeAlias.ExtractStrings)\<`E`\>
##### path?
[`ControlPath`](../wiki/TypeAlias.ControlPath)
#### Returns
`boolean`
***
### hasValidator()
> **hasValidator**(`validator`): `boolean`
Defined in: node\_modules/@angular/forms/index.d.ts:2418
Check whether a synchronous validator function is present on this control. The provided
validator must be a reference to the exact same function that was provided.
#### Parameters
##### validator
`ValidatorFn`
The validator to check for presence. Compared by function reference.
#### Returns
`boolean`
Whether the provided validator was found on this control.
#### Usage Notes
### Reference to a ValidatorFn
```
// Reference to the RequiredValidator
const ctrl = new FormControl<number | null>(0, Validators.required);
expect(ctrl.hasValidator(Validators.required)).toEqual(true)
// Reference to anonymous function inside MinValidator
const minValidator = Validators.min(3);
const ctrl = new FormControl<number | null>(0, minValidator);
expect(ctrl.hasValidator(minValidator)).toEqual(true)
expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)
```
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`hasValidator`](../wiki/Interface.AbstractControl#hasvalidator)
#### Inherited from
`UntypedFormArray.hasValidator`
***
### insert()
> **insert**(`index`, `control`): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:154](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L154)
Insert a new `AbstractControl` at the given `index` in the array.
#### Parameters
##### index
`number`
Index in the array to insert the control. If `index` is negative, wraps around
from the back. If `index` is greatly negative (less than `-length`), prepends to the array.
This behavior is the same as `Array.splice(index, 0, control)`.
##### control
[`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>
Form control to be inserted
#### Returns
`void`
#### Overrides
`UntypedFormArray.insert`
***
### insertAt()
> **insertAt**(`index`?, `state`?, `options`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:169](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L169)
inserts a new control at the specified index. If the index is undefined
the new control will be added to the end.
#### Parameters
##### index?
`number`
(optional) the index where the control should be created
##### state?
`T`
(optional) the initial state of the new control
##### options?
[`ControlEventOptions`](../wiki/TypeAlias.ControlEventOptions)
(optional) ControlEventOptions
#### Returns
`void`
***
### markAllAsDirty()
> **markAllAsDirty**(): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:233](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L233)
#### Returns
`void`
***
### markAllAsPristine()
> **markAllAsPristine**(): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:237](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L237)
#### Returns
`void`
***
### markAllAsTouched()
> **markAllAsTouched**(`opts`?): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2474
Marks the control and all its descendant controls as `touched`.
#### Parameters
##### opts?
Configuration options that determine how the control propagates changes
and emits events after marking is applied.
* `emitEvent`: When true or not supplied (the default), the `events`
observable emits a `TouchedChangeEvent` with the `touched` property being `true`.
When false, no events are emitted.
###### emitEvent?
`boolean`
#### Returns
`void`
#### See
[()](../wiki/Class.RxapFormArray#markastouched)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAllAsTouched`](../wiki/Interface.AbstractControl#markallastouched)
#### Inherited from
`UntypedFormArray.markAllAsTouched`
***
### markAllAsUntouched()
> **markAllAsUntouched**(): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:255](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L255)
#### Returns
`void`
***
### markAsDirty()
> **markAsDirty**(`opts`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:374](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L374)
Marks the control as `dirty`. A control becomes dirty when
the control's value is changed through the UI; compare `markAsTouched`.
#### Parameters
##### opts?
[`OnlySelf`](../wiki/TypeAlias.OnlySelf)
Configuration options that determine how the control propagates changes
and emits events after marking is applied.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `events`
observable emits a `PristineChangeEvent` with the `pristine` property being `false`.
When false, no events are emitted.
#### Returns
`void`
#### See
- [()](../wiki/Class.RxapFormArray#markastouched)
- [()](../wiki/Class.RxapFormArray#markasuntouched)
- [()](../wiki/Class.RxapFormArray#markaspristine)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAsDirty`](../wiki/Interface.AbstractControl#markasdirty)
#### Overrides
`UntypedFormArray.markAsDirty`
***
### markAsPending()
> **markAsPending**(`opts`?): `void`
Defined in: node\_modules/@angular/forms/index.d.ts:2559
Marks the control as `pending`.
A control is pending while the control performs async validation.
#### Parameters
##### opts?
Configuration options that determine how the control propagates changes and
emits events after marking is applied.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `statusChanges`
observable emits an event with the latest status the control is marked pending
and the `events` observable emits a `StatusChangeEvent` with the `status` property being
`PENDING` When false, no events are emitted.
###### emitEvent?
`boolean`
###### onlySelf?
`boolean`
#### Returns
`void`
#### See
[AbstractControl.status](../wiki/Interface.AbstractControl#status)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAsPending`](../wiki/Interface.AbstractControl#markaspending)
#### Inherited from
`UntypedFormArray.markAsPending`
***
### markAsPristine()
> **markAsPristine**(`opts`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:369](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L369)
Marks the control as `pristine`.
If the control has any children, marks all children as `pristine`,
and recalculates the `pristine` status of all parent
controls.
#### Parameters
##### opts?
[`OnlySelf`](../wiki/TypeAlias.OnlySelf)
Configuration options that determine how the control emits events after
marking is applied.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `events`
observable emits a `PristineChangeEvent` with the `pristine` property being `true`.
When false, no events are emitted.
#### Returns
`void`
#### See
- [()](../wiki/Class.RxapFormArray#markastouched)
- [()](../wiki/Class.RxapFormArray#markasuntouched)
- [()](../wiki/Class.RxapFormArray#markasdirty)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAsPristine`](../wiki/Interface.AbstractControl#markaspristine)
#### Overrides
`UntypedFormArray.markAsPristine`
***
### markAsTouched()
> **markAsTouched**(`opts`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:359](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L359)
Marks the control as `touched`. A control is touched by focus and
blur events that do not change the value.
#### Parameters
##### opts?
[`OnlySelf`](../wiki/TypeAlias.OnlySelf)
Configuration options that determine how the control propagates changes
and emits events after marking is applied.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `events`
observable emits a `TouchedChangeEvent` with the `touched` property being `true`.
When false, no events are emitted.
#### Returns
`void`
#### See
- [()](../wiki/Class.RxapFormArray#markasuntouched)
- [()](../wiki/Class.RxapFormArray#markasdirty)
- [()](../wiki/Class.RxapFormArray#markaspristine)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAsTouched`](../wiki/Interface.AbstractControl#markastouched)
#### Overrides
`UntypedFormArray.markAsTouched`
***
### markAsUntouched()
> **markAsUntouched**(`opts`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:364](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L364)
Marks the control as `untouched`.
If the control has any children, also marks all children as `untouched`
and recalculates the `touched` status of all parent controls.
#### Parameters
##### opts?
[`OnlySelf`](../wiki/TypeAlias.OnlySelf)
Configuration options that determine how the control propagates changes
and emits events after the marking is applied.
* `onlySelf`: When true, mark only this control. When false or not supplied,
marks all direct ancestors. Default is false.
* `emitEvent`: When true or not supplied (the default), the `events`
observable emits a `TouchedChangeEvent` with the `touched` property being `false`.
When false, no events are emitted.
#### Returns
`void`
#### See
- [()](../wiki/Class.RxapFormArray#markastouched)
- [()](../wiki/Class.RxapFormArray#markasdirty)
- [()](../wiki/Class.RxapFormArray#markaspristine)
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`markAsUntouched`](../wiki/Interface.AbstractControl#markasuntouched)
#### Overrides
`UntypedFormArray.markAsUntouched`
***
### mergeAsyncValidators()
> **mergeAsyncValidators**(`validators`): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:225](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L225)
#### Parameters
##### validators
[`AsyncValidator`](../wiki/TypeAlias.AsyncValidator)
#### Returns
`void`
***
### mergeValidators()
> **mergeValidators**(`validators`): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:221](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L221)
#### Parameters
##### validators
[`Validator`](../wiki/TypeAlias.Validator)
#### Returns
`void`
***
### patchValue()
> **patchValue**(`valueOrObservable`, `options`?): `void` \| `Subscription`
Defined in: [packages/angular/forms/src/lib/form-array.ts:304](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L304)
Patches the value of the `FormArray`. It accepts an array that matches the
structure of the control, and does its best to match the values to the correct
controls in the group.
It accepts both super-sets and sub-sets of the array without throwing an error.
#### Parameters
##### valueOrObservable
`any`
##### options?
[`ControlEventOptions`](../wiki/TypeAlias.ControlEventOptions)
Configure options that determine how the control propagates changes and
emits events after the value changes
* `onlySelf`: When true, each change only affects this control, and not its parent. Default
is false.
* `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
`valueChanges` observables emit events with the latest status and value when the control
value is updated. When false, no events are emitted. The configuration options are passed to
the [updateValueAndValidity](../wiki/Interface.AbstractControl#updatevalueandvalidity) method.
#### Returns
`void` \| `Subscription`
#### Usage Notes
### Patch the values for controls in a form array
```ts
const arr = new FormArray([
new FormControl(),
new FormControl()
]);
console.log(arr.value); // [null, null]
arr.patchValue(['Nancy']);
console.log(arr.value); // ['Nancy', null]
```
#### Implementation of
[`AbstractControl`](../wiki/Interface.AbstractControl).[`patchValue`](../wiki/Interface.AbstractControl#patchvalue)
#### Overrides
`UntypedFormArray.patchValue`
***
### push()
> **push**(`control`, `options`?): `void`
Defined in: [packages/angular/forms/src/lib/form-array.ts:341](https://gitlab.com/rxap/packages/-/blob/36b0e9732b24717840935712e316593ff6aba795/packages/angular/forms/src/lib/form-array.ts#L341)
Insert a new `AbstractControl` at the end of the array.
#### Parameters
##### control
[`AbstractControl`](../wiki/Interface.AbstractControl)\<`T`\>
Form control to be inserted
##### options?
[`ControlEventOptions`](../wiki/TypeAlias.ControlEventOptions)
Specifies whether this FormArray instance should emit events after a new
control is added.
* `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
`valueChanges` observables emit events with the latest status and value when the control is
inserted. When false, no events are emitted.
#### Returns
`void`
#### Overrides
`UntypedFormArray.pu