[@rxap/form-system](../wiki/globals) / ControlHideShowDirective

# Class: ControlHideShowDirective

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:69](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L69)

## Extends

- [`ExtractControlFromParentMixin`](../wiki/Class.ExtractControlFromParentMixin).[`ExtractFormDefinitionMixin`](../wiki/Class.ExtractFormDefinitionMixin)

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new ControlHideShowDirective()

> **new ControlHideShowDirective**(`renderer`, `elementRef`, `parent`, `ngControl`): [`ControlHideShowDirective`](../wiki/Class.ControlHideShowDirective)

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:87](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L87)

#### Parameters

##### renderer

`Renderer2`

##### elementRef

`ElementRef`

##### parent

`null` | `ControlContainer`

##### ngControl

`null` | `NgControl`

#### Returns

[`ControlHideShowDirective`](../wiki/Class.ControlHideShowDirective)

#### Inherited from

[`ExtractFormDefinitionMixin`](../wiki/Class.ExtractFormDefinitionMixin).[`constructor`](../wiki/Class.ExtractFormDefinitionMixin#constructors)

## Properties

### control

> **control**: `RxapFormControl`

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:83](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L83)

***

### controlId?

> `optional` **controlId**: `string`

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:81](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L81)

## Methods

### extractControlFromParent()

> `protected` **extractControlFromParent**(`parent`, `controlPath`): `AbstractControl`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-control-from-parent.mixin.ts:12](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-control-from-parent.mixin.ts#L12)

#### Parameters

##### parent

`ControlContainer`

##### controlPath

`string`

#### Returns

`AbstractControl`

#### Inherited from

[`ExtractControlFromParentMixin`](../wiki/Class.ExtractControlFromParentMixin).[`extractControlFromParent`](../wiki/Class.ExtractControlFromParentMixin#extractcontrolfromparent)

***

### extractFormDefinition()

> `protected` **extractFormDefinition**(`control`): `FormDefinition`

Defined in: [packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts:10](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts#L10)

#### Parameters

##### control

`AbstractControl`

#### Returns

`FormDefinition`

#### Inherited from

[`ExtractFormDefinitionMixin`](../wiki/Class.ExtractFormDefinitionMixin).[`extractFormDefinition`](../wiki/Class.ExtractFormDefinitionMixin#extractformdefinition)

***

### ngOnDestroy()

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

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:202](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L202)

A callback method that performs custom clean-up, invoked immediately
before a directive, pipe, or service instance is destroyed.

#### Returns

`void`

***

### ngOnInit()

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

Defined in: [packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts:102](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/control-hide-show.directive.ts#L102)

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`
