[**@rxap/forms v19.0.4**](../README.md)

***

[@rxap/forms](../globals.md) / FormDirective

# Class: FormDirective\<T\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:113](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L113)

## Extends

- `FormGroupDirective`

## Type Parameters

• **T** = `any`

## Implements

- `OnInit`
- `OnChanges`
- `OnDestroy`

## Constructors

### new FormDirective()

> **new FormDirective**\<`T`\>(`cdr`, `formDefinition`, `submitMethod`, `loadMethod`, `loadFailedMethod`, `loadSuccessfulMethod`, `submitFailedMethod`, `submitSuccessfulMethod`, `formDefinitionBuilder`, `loadingIndicatorService`): [`FormDirective`](FormDirective.md)\<`T`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:205](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L205)

#### Parameters

##### cdr

`ChangeDetectorRef`

##### formDefinition

`null` | [`FormDefinition`](../interfaces/FormDefinition.md)\<`any`, `any`, `any`\>

##### submitMethod

`null` | [`FormSubmitMethod`](../interfaces/FormSubmitMethod.md)\<`any`\>

##### loadMethod

`null` | [`FormLoadMethod`](../interfaces/FormLoadMethod.md)\<`any`\>

##### loadFailedMethod

`null` | [`FormLoadFailedMethod`](../interfaces/FormLoadFailedMethod.md)

##### loadSuccessfulMethod

`null` | [`FormLoadSuccessfulMethod`](../interfaces/FormLoadSuccessfulMethod.md)\<`any`\>

##### submitFailedMethod

`null` | [`FormSubmitFailedMethod`](../interfaces/FormSubmitFailedMethod.md)

##### submitSuccessfulMethod

`null` | [`FormSubmitSuccessfulMethod`](../interfaces/FormSubmitSuccessfulMethod.md)\<`any`\>

##### formDefinitionBuilder

`null` | [`RxapFormBuilder`](RxapFormBuilder.md)\<`any`, [`FormType`](../type-aliases/FormType.md)\<`any`\>\>

##### loadingIndicatorService

`null` | `LoadingIndicatorService`

#### Returns

[`FormDirective`](FormDirective.md)\<`T`\>

#### Overrides

`FormGroupDirective.constructor`

## Properties

### \_formDefinition

> `protected` **\_formDefinition**: [`FormDefinition`](../interfaces/FormDefinition.md)\<`T`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:183](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L183)

***

### cdr

> `readonly` **cdr**: `ChangeDetectorRef`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:206](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L206)

***

### context

> `readonly` **context**: `InputSignal`\<`Record`\<`string`, `unknown`\>\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:121](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L121)

***

### directives

> **directives**: `FormControlName`[]

Defined in: node\_modules/@angular/forms/index.d.ts:2909

#### Description

Tracks the list of added `FormControlName` instances

#### Inherited from

`FormGroupDirective.directives`

***

### form

> **form**: [`RxapFormGroup`](RxapFormGroup.md)\<`T`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:116](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L116)

#### Description

Tracks the `FormGroup` bound to this directive.

#### Overrides

`FormGroupDirective.form`

***

### formDefinitionBuilder

> `protected` `readonly` **formDefinitionBuilder**: `null` \| [`RxapFormBuilder`](RxapFormBuilder.md)\<`any`, [`FormType`](../type-aliases/FormType.md)\<`any`\>\> = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:244](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L244)

***

### initial?

> `optional` **initial**: `T`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:119](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L119)

***

### invalidSubmit

> **invalidSubmit**: `EventEmitter`\<`Record`\<`string`, `any`\>\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:134](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L134)

***

### loaded$

> `readonly` **loaded$**: `ToggleSubject`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:180](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L180)

***

### loadFailedMethod

> **loadFailedMethod**: `null` \| [`FormLoadFailedMethod`](../interfaces/FormLoadFailedMethod.md) = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:192](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L192)

***

### loading$

> `readonly` **loading$**: `ToggleSubject`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:179](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L179)

***

### loadingError$

> `readonly` **loadingError$**: `BehaviorSubject`\<`null` \| `Error`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:181](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L181)

***

### loadingIndicatorService

> `protected` `readonly` **loadingIndicatorService**: `null` \| `LoadingIndicatorService` = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:247](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L247)

***

### loadMethod

> **loadMethod**: `null` \| [`FormLoadMethod`](../interfaces/FormLoadMethod.md)\<`any`\> = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:189](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L189)

***

### loadSuccessfulMethod

> **loadSuccessfulMethod**: `null` \| [`FormLoadSuccessfulMethod`](../interfaces/FormLoadSuccessfulMethod.md)\<`any`\> = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:195](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L195)

***

### name

> **name**: `null` \| `string` \| `number`

Defined in: node\_modules/@angular/forms/index.d.ts:1201

#### Description

The name for the control

#### Inherited from

`FormGroupDirective.name`

***

### ngSubmit

> **ngSubmit**: `EventEmitter`\<`any`\>

Defined in: node\_modules/@angular/forms/index.d.ts:2919

#### Description

Emits an event when the form submission has been triggered.

#### Inherited from

`FormGroupDirective.ngSubmit`

***

### rxapSubmit

> **rxapSubmit**: `EventEmitter`\<`any`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:131](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L131)

Emits when the submit method is executed without errors. The result of the
submit method is passed as event object.

If no submit method is defined then emit after the submit button
is clicked.

***

### submitError$

> `readonly` **submitError$**: `BehaviorSubject`\<`null` \| `Error`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:178](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L178)

***

### submitFailedMethod

> **submitFailedMethod**: `null` \| [`FormSubmitFailedMethod`](../interfaces/FormSubmitFailedMethod.md) = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:198](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L198)

***

### submitMethod

> **submitMethod**: `null` \| [`FormSubmitMethod`](../interfaces/FormSubmitMethod.md)\<`any`\> = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:186](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L186)

***

### submitSuccessful$

> **submitSuccessful$**: `EventEmitter`\<`any`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:138](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L138)

***

### submitSuccessfulMethod

> **submitSuccessfulMethod**: `null` \| [`FormSubmitSuccessfulMethod`](../interfaces/FormSubmitSuccessfulMethod.md)\<`any`\> = `null`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:201](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L201)

***

### submitting$

> `readonly` **submitting$**: `ToggleSubject`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:177](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L177)

***

### ɵdir

> `static` **ɵdir**: `unknown`

Defined in: node\_modules/@angular/forms/index.d.ts:3035

#### Inherited from

`FormGroupDirective.ɵdir`

***

### ɵfac

> `static` **ɵfac**: `unknown`

Defined in: node\_modules/@angular/forms/index.d.ts:3034

#### Inherited from

`FormGroupDirective.ɵfac`

## Accessors

### asyncValidator

#### Get Signature

> **get** **asyncValidator**(): `null` \| `AsyncValidatorFn`

Defined in: node\_modules/@angular/forms/index.d.ts:822

##### Description

Asynchronous validator function composed of all the asynchronous validators registered with
this directive.

##### Returns

`null` \| `AsyncValidatorFn`

#### Inherited from

`FormGroupDirective.asyncValidator`

***

### control

#### Get Signature

> **get** **control**(): `FormGroup`

Defined in: node\_modules/@angular/forms/index.d.ts:2934

##### Description

Returns the `FormGroup` bound to this directive.

##### Returns

`FormGroup`

#### Inherited from

`FormGroupDirective.control`

***

### dirty

#### Get Signature

> **get** **dirty**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:762

##### Description

Reports whether the control is dirty, meaning that the user has changed
the value in the UI. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.dirty`

***

### disabled

#### Get Signature

> **get** **disabled**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:739

##### Description

Reports whether the control is disabled, meaning that the control is disabled
in the UI and is exempt from validation checks and excluded from aggregate
values of ancestor controls. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.disabled`

***

### enabled

#### Get Signature

> **get** **enabled**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:745

##### Description

Reports whether the control is enabled, meaning that the control is included in ancestor
calculations of validity or value. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.enabled`

***

### errors

#### Get Signature

> **get** **errors**(): `null` \| `ValidationErrors`

Defined in: node\_modules/@angular/forms/index.d.ts:750

##### Description

Reports the control's validation errors. If the control is not present, null is returned.

##### Returns

`null` \| `ValidationErrors`

#### Inherited from

`FormGroupDirective.errors`

***

### formDefinition

#### Get Signature

> **get** **formDefinition**(): [`FormDefinition`](../interfaces/FormDefinition.md)\<`T`\>

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:173](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L173)

##### Returns

[`FormDefinition`](../interfaces/FormDefinition.md)\<`T`\>

***

### formDirective

#### Get Signature

> **get** **formDirective**(): `Form`

Defined in: node\_modules/@angular/forms/index.d.ts:2929

##### Description

Returns this directive's instance.

##### Returns

`Form`

#### Inherited from

`FormGroupDirective.formDirective`

***

### invalid

#### Get Signature

> **get** **invalid**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:725

##### Description

Reports whether the control is invalid, meaning that an error exists in the input value.
If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.invalid`

***

### loaded

#### Get Signature

> **get** **loaded**(): `boolean`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:156](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L156)

##### Returns

`boolean`

***

### loading

#### Get Signature

> **get** **loading**(): `boolean`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:151](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L151)

##### Returns

`boolean`

***

### loadingError

#### Get Signature

> **get** **loadingError**(): `null` \| `Error`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:161](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L161)

##### Returns

`null` \| `Error`

***

### path

#### Get Signature

> **get** **path**(): `string`[]

Defined in: node\_modules/@angular/forms/index.d.ts:2940

##### Description

Returns an array representing the path to this group. Because this directive
always lives at the top level of a form, it always an empty array.

##### Returns

`string`[]

#### Inherited from

`FormGroupDirective.path`

***

### pending

#### Get Signature

> **get** **pending**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:732

##### Description

Reports whether a control is pending, meaning that async validation is occurring and
errors are not yet available for the input value. If the control is not present, null is
returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.pending`

***

### pristine

#### Get Signature

> **get** **pristine**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:756

##### Description

Reports whether the control is pristine, meaning that the user has not yet changed
the value in the UI. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.pristine`

***

### status

#### Get Signature

> **get** **status**(): `null` \| `string`

Defined in: node\_modules/@angular/forms/index.d.ts:775

##### Description

Reports the validation status of the control. Possible values include:
'VALID', 'INVALID', 'DISABLED', and 'PENDING'.
If the control is not present, null is returned.

##### Returns

`null` \| `string`

#### Inherited from

`FormGroupDirective.status`

***

### statusChanges

#### Get Signature

> **get** **statusChanges**(): `null` \| `Observable`\<`any`\>

Defined in: node\_modules/@angular/forms/index.d.ts:787

##### Description

Returns a multicasting observable that emits a validation status whenever it is
calculated for the control. If the control is not present, null is returned.

##### Returns

`null` \| `Observable`\<`any`\>

#### Inherited from

`FormGroupDirective.statusChanges`

***

### submitError

#### Get Signature

> **get** **submitError**(): `null` \| `Error`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:146](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L146)

##### Returns

`null` \| `Error`

***

### submitted

#### Get Signature

> **get** **submitted**(): `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:2892

##### Description

Reports whether the form submission has been triggered.

##### Returns

`boolean`

#### Set Signature

> **set** **submitted**(`value`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2893

##### Parameters

###### value

`boolean`

##### Returns

`void`

#### Inherited from

`FormGroupDirective.submitted`

***

### submitting

#### Get Signature

> **get** **submitting**(): `boolean`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:141](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L141)

##### Returns

`boolean`

***

### touched

#### Get Signature

> **get** **touched**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:768

##### Description

Reports whether the control is touched, meaning that the user has triggered
a `blur` event on it. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.touched`

***

### untouched

#### Get Signature

> **get** **untouched**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:781

##### Description

Reports whether the control is untouched, meaning that the user has not yet triggered
a `blur` event on it. If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.untouched`

***

### useFormDefinition

#### Set Signature

> **set** **useFormDefinition**(`value`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:166](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L166)

##### Parameters

###### value

`""` | [`FormDefinition`](../interfaces/FormDefinition.md)\<`T`, `any`, `any`\>

##### Returns

`void`

***

### valid

#### Get Signature

> **get** **valid**(): `null` \| `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:719

##### Description

Reports whether the control is valid. A control is considered valid if no
validation errors exist with the current value.
If the control is not present, null is returned.

##### Returns

`null` \| `boolean`

#### Inherited from

`FormGroupDirective.valid`

***

### validator

#### Get Signature

> **get** **validator**(): `null` \| `ValidatorFn`

Defined in: node\_modules/@angular/forms/index.d.ts:816

##### Description

Synchronous validator function composed of all the synchronous validators registered with this
directive.

##### Returns

`null` \| `ValidatorFn`

#### Inherited from

`FormGroupDirective.validator`

***

### value

#### Get Signature

> **get** **value**(): `any`

Defined in: node\_modules/@angular/forms/index.d.ts:712

##### Description

Reports the value of the control if it is present, otherwise null.

##### Returns

`any`

#### Inherited from

`FormGroupDirective.value`

***

### valueChanges

#### Get Signature

> **get** **valueChanges**(): `null` \| `Observable`\<`any`\>

Defined in: node\_modules/@angular/forms/index.d.ts:794

##### Description

Returns a multicasting observable of value changes for the control that emits every time the
value of the control changes in the UI or programmatically.
If the control is not present, null is returned.

##### Returns

`null` \| `Observable`\<`any`\>

#### Inherited from

`FormGroupDirective.valueChanges`

## Methods

### addControl()

> **addControl**(`dir`): `FormControl`

Defined in: node\_modules/@angular/forms/index.d.ts:2948

#### Parameters

##### dir

`FormControlName`

The `FormControlName` directive instance.

#### Returns

`FormControl`

#### Description

Method that sets up the control directive in this group, re-calculates its value
and validity, and adds the instance to the internal list of directives.

#### Inherited from

`FormGroupDirective.addControl`

***

### addFormArray()

> **addFormArray**(`dir`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2988

Performs the necessary setup when a `FormArrayName` directive instance is added to the view.

#### Parameters

##### dir

`FormArrayName`

The `FormArrayName` directive instance.

#### Returns

`void`

#### Inherited from

`FormGroupDirective.addFormArray`

***

### addFormGroup()

> **addFormGroup**(`dir`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2968

Adds a new `FormGroupName` directive instance to the form.

#### Parameters

##### dir

`FormGroupName`

The `FormGroupName` directive instance.

#### Returns

`void`

#### Inherited from

`FormGroupDirective.addFormGroup`

***

### getControl()

> **getControl**(`dir`): `FormControl`

Defined in: node\_modules/@angular/forms/index.d.ts:2955

#### Parameters

##### dir

`FormControlName`

The `FormControlName` directive instance.

#### Returns

`FormControl`

#### Description

Retrieves the `FormControl` instance from the provided `FormControlName` directive

#### Inherited from

`FormGroupDirective.getControl`

***

### getError()

> **getError**(`errorCode`, `path`?): `any`

Defined in: node\_modules/@angular/forms/index.d.ts:887

#### Parameters

##### errorCode

`string`

The code of the error to check

##### path?

A list of control names that designates how to move from the current control
to the control that should be queried for errors.

`string` | (`string` \| `number`)[]

#### Returns

`any`

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'`

#### Inherited from

`FormGroupDirective.getError`

***

### getFormArray()

> **getFormArray**(`dir`): `FormArray`

Defined in: node\_modules/@angular/forms/index.d.ts:3002

#### Parameters

##### dir

`FormArrayName`

The `FormArrayName` directive instance.

#### Returns

`FormArray`

#### Description

Retrieves the `FormArray` for a provided `FormArrayName` directive instance.

#### Inherited from

`FormGroupDirective.getFormArray`

***

### getFormGroup()

> **getFormGroup**(`dir`): `FormGroup`

Defined in: node\_modules/@angular/forms/index.d.ts:2982

#### Parameters

##### dir

`FormGroupName`

The `FormGroupName` directive instance.

#### Returns

`FormGroup`

#### Description

Retrieves the `FormGroup` for a provided `FormGroupName` directive instance

#### Inherited from

`FormGroupDirective.getFormGroup`

***

### getSubmitValue()

> `protected` **getSubmitValue**(): `T`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:474](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L474)

#### Returns

`T`

***

### hasError()

> **hasError**(`errorCode`, `path`?): `boolean`

Defined in: node\_modules/@angular/forms/index.d.ts:859

#### Parameters

##### errorCode

`string`

The code of the error to check

##### path?

A list of control names that designates how to move from the current control
to the control that should be queried for errors.

`string` | (`string` \| `number`)[]

#### 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.

#### Inherited from

`FormGroupDirective.hasError`

***

### loadFailed()

> `protected` **loadFailed**(`error`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:464](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L464)

#### Parameters

##### error

`Error`

#### Returns

`void`

***

### loadInitialState()

> `protected` **loadInitialState**(`form`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:404](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L404)

#### Parameters

##### form

[`RxapFormGroup`](RxapFormGroup.md)

#### Returns

`void`

***

### loadSuccessful()

> `protected` **loadSuccessful**(`value`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:454](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L454)

#### Parameters

##### value

`any`

#### Returns

`void`

***

### ngOnChanges()

> **ngOnChanges**(`changes`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:267](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L267)

#### Parameters

##### changes

`SimpleChanges`

#### Returns

`void`

#### Nodoc

#### Implementation of

`OnChanges.ngOnChanges`

#### Overrides

`FormGroupDirective.ngOnChanges`

***

### ngOnDestroy()

> **ngOnDestroy**(): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:559](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L559)

#### Returns

`void`

#### Nodoc

#### Implementation of

`OnDestroy.ngOnDestroy`

#### Overrides

`FormGroupDirective.ngOnDestroy`

***

### ngOnInit()

> **ngOnInit**(): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:277](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L277)

A callback method that is invoked immediately after the
default change detector has checked the directive's
data-bound properties for the first time,
and before any of the view or content children have been checked.
It is invoked only once when the directive is instantiated.

#### Returns

`void`

#### Implementation of

`OnInit.ngOnInit`

***

### onReset()

> **onReset**(): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:3022

#### Returns

`void`

#### Description

Method called when the "reset" event is triggered on the form.

#### Inherited from

`FormGroupDirective.onReset`

***

### onSubmit()

> **onSubmit**(`$event`): `boolean`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:322](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L322)

#### Parameters

##### $event

`Event`

The "submit" event object

#### Returns

`boolean`

#### Description

Method called with the "submit" event is triggered on the form.
Triggers the `ngSubmit` emitter to emit the "submit" event as its payload.

#### Overrides

`FormGroupDirective.onSubmit`

***

### removeControl()

> **removeControl**(`dir`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2962

#### Parameters

##### dir

`FormControlName`

The `FormControlName` directive instance.

#### Returns

`void`

#### Description

Removes the `FormControlName` instance from the internal list of directives

#### Inherited from

`FormGroupDirective.removeControl`

***

### removeFormArray()

> **removeFormArray**(`dir`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2995

Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the
view.

#### Parameters

##### dir

`FormArrayName`

The `FormArrayName` directive instance.

#### Returns

`void`

#### Inherited from

`FormGroupDirective.removeFormArray`

***

### removeFormGroup()

> **removeFormGroup**(`dir`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:2975

Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the
view.

#### Parameters

##### dir

`FormGroupName`

The `FormGroupName` directive instance.

#### Returns

`void`

#### Inherited from

`FormGroupDirective.removeFormGroup`

***

### reset()

> **reset**(`value`?): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:828

#### Parameters

##### value?

`any`

#### Returns

`void`

#### Description

Resets the control with the provided value if the control is present.

#### Inherited from

`FormGroupDirective.reset`

***

### resetForm()

> **resetForm**(`value`?): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:3029

#### Parameters

##### value?

`any`

The new value for the form.

#### Returns

`void`

#### Description

Resets the form to an initial value and resets its submitted status.

#### Inherited from

`FormGroupDirective.resetForm`

***

### submit()

> `protected` **submit**(): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:488](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L488)

#### Returns

`void`

***

### submitFailed()

> `protected` **submitFailed**(`error`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:534](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L534)

#### Parameters

##### error

`Error`

#### Returns

`void`

***

### submitSuccessful()

> `protected` **submitSuccessful**(`value`): `void`

Defined in: [packages/angular/forms/src/lib/directives/form.directive.ts:547](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/forms/src/lib/directives/form.directive.ts#L547)

#### Parameters

##### value

`any`

#### Returns

`void`

***

### updateModel()

> **updateModel**(`dir`, `value`): `void`

Defined in: node\_modules/@angular/forms/index.d.ts:3009

Sets the new value for the provided `FormControlName` directive.

#### Parameters

##### dir

`FormControlName`

The `FormControlName` directive instance.

##### value

`any`

The new value for the directive's control.

#### Returns

`void`

#### Inherited from

`FormGroupDirective.updateModel`
