[**@rxap/form-system v19.0.4-dev.0**](../README.md)

***

[@rxap/form-system](../globals.md) / OptionsFromMethodDirective

# Class: OptionsFromMethodDirective\<Value, Parameters\>

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:39](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L39)

## Extends

- `AfterViewInit`.`OnChanges`.[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md)

## Extended by

- [`AutocompleteOptionsFromMethodDirective`](AutocompleteOptionsFromMethodDirective.md)

## Type Parameters

• **Value** = `any`

• **Parameters** = `any`

## Implements

- `AfterViewInit`
- `OnChanges`

## Constructors

### new OptionsFromMethodDirective()

> **new OptionsFromMethodDirective**\<`Value`, `Parameters`\>(): [`OptionsFromMethodDirective`](OptionsFromMethodDirective.md)\<`Value`, `Parameters`\>

#### Returns

[`OptionsFromMethodDirective`](OptionsFromMethodDirective.md)\<`Value`, `Parameters`\>

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`constructor`](ExtractOptionsMethodMixin.md#constructors)

## Properties

### cdr

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

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:73](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L73)

***

### control?

> `protected` `optional` **control**: `RxapFormControl`\<`any`, `any`, `any`\>

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

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`control`](ExtractOptionsMethodMixin.md#control)

***

### injector

> `protected` `readonly` **injector**: `Injector`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:72](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L72)

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`injector`](ExtractOptionsMethodMixin.md#injector)

***

### matFormField

> `protected` **matFormField**: `null` \| `MatFormField` = `null`

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

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`matFormField`](ExtractOptionsMethodMixin.md#matformfield)

***

### method

> **method**: `Method`\<`ControlOptions`, `Parameters`\>

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:67](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L67)

***

### ngControl

> `protected` **ngControl**: `null` \| `NgControl` \| `AbstractControlDirective` = `null`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:68](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L68)

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`ngControl`](ExtractOptionsMethodMixin.md#ngcontrol)

***

### options

> **options**: `null` \| `ControlOptions` = `null`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:64](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L64)

***

### parameters?

> `optional` **parameters**: `Parameters`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:59](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L59)

***

### resetOnChange?

> `optional` **resetOnChange**: `Value`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:62](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L62)

***

### settings

> `protected` **settings**: [`OptionsFromMethodDirectiveSettings`](../interfaces/OptionsFromMethodDirectiveSettings.md) = `{}`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:70](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L70)

***

### viewContainerRef

> `protected` `readonly` **viewContainerRef**: `ViewContainerRef`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:71](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L71)

## Methods

### extractControl()

> `protected` **extractControl**(`ngControl`): `RxapFormControl`

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

#### Parameters

##### ngControl

`null` | `NgControl` | `AbstractControlDirective`

#### Returns

`RxapFormControl`

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`extractControl`](ExtractOptionsMethodMixin.md#extractcontrol)

***

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

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`extractFormDefinition`](ExtractOptionsMethodMixin.md#extractformdefinition)

***

### extractMethod()

> **extractMethod**(`formDefinition`, `controlId`, `name`): `Method`\<`any`, `any`\>

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

#### Parameters

##### formDefinition

`FormDefinition`

##### controlId

`string`

##### name

`string`

#### Returns

`Method`\<`any`, `any`\>

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`extractMethod`](ExtractOptionsMethodMixin.md#extractmethod)

***

### extractMethods()

> `protected` **extractMethods**(`formDefinition`, `controlId`): `Map`\<`string`, [`UseMethodDefinition`](../interfaces/UseMethodDefinition.md)\<`unknown`, `unknown`, [`UseMethodConfig`](../interfaces/UseMethodConfig.md)\<`unknown`, `unknown`, `any`, `any`\>\>\>

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

#### Parameters

##### formDefinition

`FormDefinition`

##### controlId

`string`

#### Returns

`Map`\<`string`, [`UseMethodDefinition`](../interfaces/UseMethodDefinition.md)\<`unknown`, `unknown`, [`UseMethodConfig`](../interfaces/UseMethodConfig.md)\<`unknown`, `unknown`, `any`, `any`\>\>\>

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`extractMethods`](ExtractOptionsMethodMixin.md#extractmethods)

***

### extractOptionsMethod()

> `protected` **extractOptionsMethod**(`control`, `formDefinition`): `Method`\<`any`, `any`\>

Defined in: [packages/angular/form-system/src/lib/mixins/extract-options-method.mixin.ts:29](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/mixins/extract-options-method.mixin.ts#L29)

#### Parameters

##### control

`RxapFormControl` = `...`

##### formDefinition

`FormDefinition`\<`any`, `any`, `any`\> = `...`

#### Returns

`Method`\<`any`, `any`\>

#### Inherited from

[`ExtractOptionsMethodMixin`](ExtractOptionsMethodMixin.md).[`extractOptionsMethod`](ExtractOptionsMethodMixin.md#extractoptionsmethod)

***

### loadOptions()

> `protected` **loadOptions**(`parameters`?): `Promise`\<`null` \| `ControlOptions`\>

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:101](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L101)

#### Parameters

##### parameters?

`Parameters`

#### Returns

`Promise`\<`null` \| `ControlOptions`\>

***

### ngAfterViewInit()

> **ngAfterViewInit**(): `Promise`\<`void`\>

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:76](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L76)

A callback method that is invoked immediately after
Angular has completed initialization of a component's view.
It is invoked only once when the view is instantiated.

#### Returns

`Promise`\<`void`\>

#### Inherited from

`AfterViewInit.ngAfterViewInit`

***

### ngOnChanges()

> **ngOnChanges**(`changes`): `Promise`\<`void`\>

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:88](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L88)

A callback method that is invoked immediately after the
default change detector has checked data-bound properties
if at least one has changed, and before the view and content
children are checked.

#### Parameters

##### changes

`SimpleChanges`

The changed properties.

#### Returns

`Promise`\<`void`\>

#### Inherited from

`OnChanges.ngOnChanges`

***

### renderTemplate()

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

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:105](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L105)

#### Returns

`void`

***

### setOptions()

> `protected` **setOptions**(`options`): `void`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:125](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L125)

#### Parameters

##### options

`null` | `ControlOptions`

#### Returns

`void`

***

### ngTemplateContextGuard()

> `static` **ngTemplateContextGuard**(`dir`, `ctx`): `ctx is OptionsFromMethodTemplateContext`

Defined in: [packages/angular/form-system/src/lib/directives/options-from-method.directive.ts:51](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/form-system/src/lib/directives/options-from-method.directive.ts#L51)

#### Parameters

##### dir

[`OptionsFromMethodDirective`](OptionsFromMethodDirective.md)

##### ctx

`any`

#### Returns

`ctx is OptionsFromMethodTemplateContext`
