Skip to main content

Class: ControlComponent<MODEL, EMBEDDED>

deprecated you should implement ControlValueAccessor yourself, this was not a great idea in the end

Type parameters​

NameType
MODELMODEL
EMBEDDEDMODEL

Hierarchy​

Implements​

  • OnInit
  • ControlValueAccessor

Constructors​

constructor​

• new ControlComponent<MODEL, EMBEDDED>(logger, cdr, controlContainer?)

Type parameters​

NameType
MODELMODEL
EMBEDDEDMODEL

Parameters​

NameType
loggerLogger
cdrChangeDetectorRef
controlContainer?ControlContainer

Overrides​

OnDestroy$.constructor

Defined in​

libs/ng-core/src/lib/components/control.component.ts:69

Properties​

_formControl​

• Private Optional _formControl: AbstractControl

Defined in​

libs/ng-core/src/lib/components/control.component.ts:65


_formControlName​

• Private Optional _formControlName: string

Defined in​

libs/ng-core/src/lib/components/control.component.ts:67


_model​

• Protected _model: MODEL

Defined in​

libs/ng-core/src/lib/components/control.component.ts:63


cdr​

• Protected cdr: ChangeDetectorRef


controlChanged​

• Protected controlChanged: Subject<void>

Defined in​

libs/ng-core/src/lib/components/control.component.ts:61


controlContainer​

• Protected Optional controlContainer: ControlContainer


defaultValue​

• Optional defaultValue: MODEL

Defined in​

libs/ng-core/src/lib/components/control.component.ts:59


disabled​

• disabled: boolean = false

Defined in​

libs/ng-core/src/lib/components/control.component.ts:53


embeddedControl​

• Optional embeddedControl: AbstractControl

Defined in​

libs/ng-core/src/lib/components/control.component.ts:55


logger​

• Protected logger: Logger


name​

• Optional name: string

Defined in​

libs/ng-core/src/lib/components/control.component.ts:23


onDestroy$​

• onDestroy$: Observable<void>

Inherited from​

OnDestroy$.onDestroy$

Defined in​

libs/ng-core/src/lib/mixins/on-destroy.mixin.ts:9


onModelChange​

• Protected onModelChange: Function

Defined in​

libs/ng-core/src/lib/components/control.component.ts:129


onModelTouched​

• Protected onModelTouched: Function

Defined in​

libs/ng-core/src/lib/components/control.component.ts:131


required​

• Optional required: boolean

Defined in​

libs/ng-core/src/lib/components/control.component.ts:20


subSink​

• subSink: Subscription

Inherited from​

OnDestroy$.subSink

Defined in​

libs/ng-core/src/lib/mixins/on-destroy.mixin.ts:10


valueChanges​

• Optional valueChanges: Observable<any>

Defined in​

libs/ng-core/src/lib/components/control.component.ts:57


arguments​

â–ª Static arguments: any

Inherited from​

OnDestroy$.arguments

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:302


caller​

â–ª Static caller: Function

Inherited from​

OnDestroy$.caller

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:303


length​

â–ª Static Readonly length: number

Inherited from​

OnDestroy$.length

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:299


name​

â–ª Static Readonly name: string

Returns the name of the function. Function names are read-only and can not be changed.

Inherited from​

OnDestroy$.name

Defined in​

apps/docs/node_modules/typescript/lib/lib.es2015.core.d.ts:97

Accessors​

formControl​

• get formControl(): Maybe<AbstractControl>

Returns​

Maybe<AbstractControl>

Defined in​

libs/ng-core/src/lib/components/control.component.ts:36

• set formControl(value): void

Parameters​

NameType
valueMaybe<AbstractControl>

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:40


formControlName​

• get formControlName(): Maybe<string>

Returns​

Maybe<string>

Defined in​

libs/ng-core/src/lib/components/control.component.ts:26

• set formControlName(value): void

Parameters​

NameType
valueMaybe<string>

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:30


model​

• get model(): MODEL

Returns​

MODEL

Defined in​

libs/ng-core/src/lib/components/control.component.ts:45

• set model(value): void

Parameters​

NameType
valueMODEL

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:49

Methods​

bindEmbeddedControl​

â–¸ Private bindEmbeddedControl(): void

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:133


computeName​

â–¸ Private computeName(): void

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:160


computeRequired​

â–¸ Private computeRequired(): void

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:145


embeddedValueToValue​

â–¸ Protected embeddedValueToValue(value): MODEL

Parameters​

NameType
valueEMBEDDED

Returns​

MODEL

Defined in​

libs/ng-core/src/lib/components/control.component.ts:123


emptySink​

â–¸ emptySink(): void

Returns​

void

Inherited from​

OnDestroy$.emptySink

Defined in​

libs/ng-core/src/lib/mixins/on-destroy.mixin.ts:13


firstUntilDestroyed​

â–¸ firstUntilDestroyed<T>(): MonoTypeOperatorFunction<T>

Type parameters​

Name
T

Returns​

MonoTypeOperatorFunction<T>

Inherited from​

OnDestroy$.firstUntilDestroyed

Defined in​

libs/ng-core/src/lib/mixins/on-destroy.mixin.ts:12


ngOnDestroy​

â–¸ ngOnDestroy(): void

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

Returns​

void

Inherited from​

OnDestroy$.ngOnDestroy

Defined in​

node_modules/@angular/core/core.d.ts:5167


ngOnInit​

â–¸ ngOnInit(): void

Returns​

void

Implementation of​

OnInit.ngOnInit

Defined in​

libs/ng-core/src/lib/components/control.component.ts:73


registerOnChange​

â–¸ registerOnChange(fn): void

Parameters​

NameType
fnFunction

Returns​

void

Implementation of​

ControlValueAccessor.registerOnChange

Defined in​

libs/ng-core/src/lib/components/control.component.ts:96


registerOnTouched​

â–¸ registerOnTouched(fn): void

Parameters​

NameType
fnFunction

Returns​

void

Implementation of​

ControlValueAccessor.registerOnTouched

Defined in​

libs/ng-core/src/lib/components/control.component.ts:100


setDisabledState​

â–¸ setDisabledState(isDisabled): void

Parameters​

NameType
isDisabledboolean

Returns​

void

Implementation of​

ControlValueAccessor.setDisabledState

Defined in​

libs/ng-core/src/lib/components/control.component.ts:104


setModelAndEmit​

â–¸ setModelAndEmit(value): void

Parameters​

NameType
valueMODEL

Returns​

void

Defined in​

libs/ng-core/src/lib/components/control.component.ts:112


untilDestroyed​

â–¸ untilDestroyed<T>(): MonoTypeOperatorFunction<T>

Type parameters​

Name
T

Returns​

MonoTypeOperatorFunction<T>

Inherited from​

OnDestroy$.untilDestroyed

Defined in​

libs/ng-core/src/lib/mixins/on-destroy.mixin.ts:11


valueToEmbeddedValue​

â–¸ Protected valueToEmbeddedValue(value): EMBEDDED

Parameters​

NameType
valueMODEL

Returns​

EMBEDDED

Defined in​

libs/ng-core/src/lib/components/control.component.ts:119


writeValue​

â–¸ writeValue(value): void

Parameters​

NameType
valueMODEL

Returns​

void

Implementation of​

ControlValueAccessor.writeValue

Defined in​

libs/ng-core/src/lib/components/control.component.ts:85


[hasInstance]​

â–¸ Static [hasInstance](value): boolean

Determines whether the given value inherits from this function if this function was used as a constructor function.

A constructor function can control which objects are recognized as its instances by 'instanceof' by overriding this method.

Parameters​

NameType
valueany

Returns​

boolean

Inherited from​

OnDestroy$.[hasInstance]

Defined in​

apps/docs/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:162


apply​

â–¸ Static apply<T>(thisArg): void

Calls the function with the specified object as the this value and the elements of specified array as the arguments.

Type parameters​

Name
T

Parameters​

NameTypeDescription
thisArgTThe object to be used as the this object.

Returns​

void

Inherited from​

OnDestroy$.apply

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:364

â–¸ Static apply<T, A>(thisArg, args): void

Type parameters​

NameType
TT
Aextends any[]

Parameters​

NameType
thisArgT
argsA

Returns​

void

Inherited from​

OnDestroy$.apply

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:365

â–¸ Static apply(thisArg, argArray?): any

Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.

Parameters​

NameTypeDescription
thisArganyThe object to be used as the this object.
argArray?anyA set of arguments to be passed to the function.

Returns​

any

Inherited from​

OnDestroy$.apply

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:278


bind​

â–¸ Static bind<T>(thisArg): T

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Type parameters​

Name
T

Parameters​

NameTypeDescription
thisArganyThe object to be used as the this object.

Returns​

T

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:380

â–¸ Static bind<A0, A, R>(thisArg, arg0): (...args: A) => R

Type parameters​

NameType
A0A0
Aextends any[]
RR

Parameters​

NameType
thisArgany
arg0A0

Returns​

fn

• new bind(...args)

Parameters​
NameType
...argsA

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:381

â–¸ Static bind<A0, A1, A, R>(thisArg, arg0, arg1): (...args: A) => R

Type parameters​

NameType
A0A0
A1A1
Aextends any[]
RR

Parameters​

NameType
thisArgany
arg0A0
arg1A1

Returns​

fn

• new bind(...args)

Parameters​
NameType
...argsA

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:382

â–¸ Static bind<A0, A1, A2, A, R>(thisArg, arg0, arg1, arg2): (...args: A) => R

Type parameters​

NameType
A0A0
A1A1
A2A2
Aextends any[]
RR

Parameters​

NameType
thisArgany
arg0A0
arg1A1
arg2A2

Returns​

fn

• new bind(...args)

Parameters​
NameType
...argsA

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:383

â–¸ Static bind<A0, A1, A2, A3, A, R>(thisArg, arg0, arg1, arg2, arg3): (...args: A) => R

Type parameters​

NameType
A0A0
A1A1
A2A2
A3A3
Aextends any[]
RR

Parameters​

NameType
thisArgany
arg0A0
arg1A1
arg2A2
arg3A3

Returns​

fn

• new bind(...args)

Parameters​
NameType
...argsA

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:384

â–¸ Static bind<AX, R>(thisArg, ...args): (...args: AX[]) => R

Type parameters​

Name
AX
R

Parameters​

NameType
thisArgany
...argsAX[]

Returns​

fn

• new bind(...args)

Parameters​
NameType
...argsAX[]

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:385

â–¸ Static bind(thisArg, ...argArray): any

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters​

NameTypeDescription
thisArganyAn object to which the this keyword can refer inside the new function.
...argArrayany[]A list of arguments to be passed to the new function.

Returns​

any

Inherited from​

OnDestroy$.bind

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:293


call​

â–¸ Static call<T, A>(thisArg, ...args): void

Calls the function with the specified object as the this value and the specified rest arguments as the arguments.

Type parameters​

NameType
TT
Aextends any[]

Parameters​

NameTypeDescription
thisArgTThe object to be used as the this object.
...argsAArgument values to be passed to the function.

Returns​

void

Inherited from​

OnDestroy$.call

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:372

â–¸ Static call(thisArg, ...argArray): any

Calls a method of an object, substituting another object for the current object.

Parameters​

NameTypeDescription
thisArganyThe object to be used as the current object.
...argArrayany[]A list of arguments to be passed to the method.

Returns​

any

Inherited from​

OnDestroy$.call

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:285


toString​

â–¸ Static toString(): string

Returns a string representation of a function.

Returns​

string

Inherited from​

OnDestroy$.toString

Defined in​

apps/docs/node_modules/typescript/lib/lib.es5.d.ts:296