# Class FormGroupNameDirective

A full exertion of FormGroupName from @angular/forms. The only change is the ability to access the control container outside of the current component

#### Deprecated

use the ParentControlContainerDirective

#### Hierarchy

- FormGroupName
  - FormGroupNameDirective

- Defined in packages/angular/forms/src/lib/directives/form-group-name.directive.ts:35

#####
Index

### Constructors

constructor

### Properties

name
ɵdir
ɵfac

### Accessors

asyncValidator
control
dirty
disabled
enabled
errors
formDirective
invalid
path
pending
pristine
status
statusChanges
touched
untouched
valid
validator
value
valueChanges

### Methods

getError
hasError
ngOnDestroy
ngOnInit
reset

## Constructors

### constructor

- new FormGroupNameDirective(parent, validators, asyncValidators): FormGroupNameDirective

- #### Parameters

  - parent: ControlContainer
  - validators: any[]
  - asyncValidators: any[]

  #### Returns FormGroupNameDirective

  Overrides FormGroupName.constructor

  - Defined in packages/angular/forms/src/lib/directives/form-group-name.directive.ts:45

## Properties

### name

name: null | string | number

Overrides FormGroupName.name

- Defined in packages/angular/forms/src/lib/directives/form-group-name.directive.ts:38

### `Static` ɵdir

ɵdir: unknown

Inherited from FormGroupName.ɵdir

- Defined in node_modules/@angular/forms/index.d.ts:3098

### `Static` ɵfac

ɵfac: unknown

Inherited from FormGroupName.ɵfac

- Defined in node_modules/@angular/forms/index.d.ts:3097

## Accessors

### asyncValidator

- get asyncValidator(): null | AsyncValidatorFn

- #### Returns null | AsyncValidatorFn

  #### Description

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

  Inherited from FormGroupName.asyncValidator

  - Defined in node_modules/@angular/forms/index.d.ts:820

### control

- get control(): RxapFormGroup<any, any>

- #### Returns RxapFormGroup<any, any>

  Overrides FormGroupName.control

  - Defined in packages/angular/forms/src/lib/directives/form-group-name.directive.ts:40

### dirty

- get dirty(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.dirty

  - Defined in node_modules/@angular/forms/index.d.ts:760

### disabled

- get disabled(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.disabled

  - Defined in node_modules/@angular/forms/index.d.ts:737

### enabled

- get enabled(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.enabled

  - Defined in node_modules/@angular/forms/index.d.ts:743

### errors

- get errors(): null | ValidationErrors

- #### Returns null | ValidationErrors

  #### Description

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

  Inherited from FormGroupName.errors

  - Defined in node_modules/@angular/forms/index.d.ts:748

### formDirective

- get formDirective(): null | Form

- #### Returns null | Form

  #### Description

  The top-level directive for this group if present, otherwise null.

  Inherited from FormGroupName.formDirective

  - Defined in node_modules/@angular/forms/index.d.ts:949

### invalid

- get invalid(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.invalid

  - Defined in node_modules/@angular/forms/index.d.ts:723

### path

- get path(): string[]

- #### Returns string[]

  #### Description

  The path to this group from the top-level directive.

  Inherited from FormGroupName.path

  - Defined in node_modules/@angular/forms/index.d.ts:944

### pending

- get pending(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.pending

  - Defined in node_modules/@angular/forms/index.d.ts:730

### pristine

- get pristine(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.pristine

  - Defined in node_modules/@angular/forms/index.d.ts:754

### status

- get status(): null | string

- #### Returns null | string

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

  Inherited from FormGroupName.status

  - Defined in node_modules/@angular/forms/index.d.ts:773

### statusChanges

- get statusChanges(): null | Observable<any>

- #### Returns null | Observable<any>

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

  Inherited from FormGroupName.statusChanges

  - Defined in node_modules/@angular/forms/index.d.ts:785

### touched

- get touched(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.touched

  - Defined in node_modules/@angular/forms/index.d.ts:766

### untouched

- get untouched(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.untouched

  - Defined in node_modules/@angular/forms/index.d.ts:779

### valid

- get valid(): null | boolean

- #### Returns null | boolean

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

  Inherited from FormGroupName.valid

  - Defined in node_modules/@angular/forms/index.d.ts:717

### validator

- get validator(): null | ValidatorFn

- #### Returns null | ValidatorFn

  #### Description

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

  Inherited from FormGroupName.validator

  - Defined in node_modules/@angular/forms/index.d.ts:814

### value

- get value(): any

- #### Returns any

  #### Description

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

  Inherited from FormGroupName.value

  - Defined in node_modules/@angular/forms/index.d.ts:710

### valueChanges

- get valueChanges(): null | Observable<any>

- #### Returns null | Observable<any>

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

  Inherited from FormGroupName.valueChanges

  - Defined in node_modules/@angular/forms/index.d.ts:792

## Methods

### getError

- getError(errorCode, path?): any

- #### Parameters

  - errorCode: string

    The code of the error to check

  - `Optional` path: string | (string | number)[]

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

  #### 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`:

      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']`
  2. A period-delimited list of control names in one string, e.g. `'address.street'`

  Inherited from FormGroupName.getError

  - Defined in node_modules/@angular/forms/index.d.ts:885

### hasError

- hasError(errorCode, path?): boolean

- #### Parameters

  - errorCode: string

    The code of the error to check

  - `Optional` path: string | (string | number)[]

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

      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']`
  2. 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 FormGroupName.hasError

  - Defined in node_modules/@angular/forms/index.d.ts:857

### ngOnDestroy

- ngOnDestroy(): void

- #### Returns void

  #### Nodoc

  Inherited from FormGroupName.ngOnDestroy

  - Defined in node_modules/@angular/forms/index.d.ts:934

### ngOnInit

- ngOnInit(): void

- #### Returns void

  #### Nodoc

  Inherited from FormGroupName.ngOnInit

  - Defined in node_modules/@angular/forms/index.d.ts:932

### reset

- reset(value?): void

- #### Parameters

  - `Optional` value: any

  #### Returns void

  #### Description

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

  Inherited from FormGroupName.reset

  - Defined in node_modules/@angular/forms/index.d.ts:826