Getting Started
Writing content
API Documentation
Customization
Recipes
API References Develop
@ng-doc/ui-kit / Class

NgDocToggleComponent

Decorators:@Component @UntilDestroy
Generic types:T
Selectors:ng-doc-toggle
Extends:DIStateControl<T>
Implements:OnInitControlValueAccessor

No documentation has been provided.

Constructor

No documentation has been provided.

Presentation
constructor(
	
): NgDocToggleComponent<T>;

Properties

NameTypeDescription
change
p
inherited from DIControlValueAccessor
(value: T | null) => void
changeDetectorRef
p r
inherited from DIControlValueAccessor
ChangeDetectorRef
checked
inherited from DIStateControl
Signal<boolean | null>
config
p r
inherited from DIStateControl
DIStateControlConfig<boolean | TModel> | undefined
disabledValue
p r
inherited from DIControlValueAccessor
WritableSignal<boolean>
dragging
boolean
elementRef
p r
inherited from DIControlValueAccessor
ElementRef<HTMLElement>
incomingUpdate
p r
inherited from DIControlValueAccessor
((value: T | null) => void) | undefined
model
p r
inherited from DIControlValueAccessor
Signal<T | null>
ngControl
p r
inherited from DIControlValueAccessor
NgControl | null
renderer
p r
inherited from DIControlValueAccessor
Renderer2
touch
p
inherited from DIControl
() => void

Function that should be used to make control touched.

value
inherited from DIStateControl
true | TModel

Accessors

get disabled

inherited from DIControlValueAccessor

Returns true if the control is disabled.

Presentation
get disabled(): boolean;
Type

boolean

set disabled

inherited from DIControlValueAccessor

No documentation has been provided.

Presentation
set disabled(isDisabled: boolean);
Type

boolean

get hasValue

inherited from DIControlValueAccessor

Returns true if the control is not empty.

Presentation
get hasValue(): boolean;
Type

boolean

get isIntermediate

inherited from DIStateControl

No documentation has been provided.

Presentation
get isIntermediate(): boolean;
Type

boolean

Methods

check()

inherited from DIStateControl

Sets checked state

Presentation
check(): void;
Returns
void
Overload #1

Sets checked state

Presentation
check(): void;
Returns
void

intermediate()

inherited from DIStateControl

Sets intermediate state

Presentation
intermediate(): void;
Returns
void
Overload #1

Sets intermediate state

Presentation
intermediate(): void;
Returns
void

ngOnChanges()

inherited from DIStateControl

No documentation has been provided.

Presentation
ngOnChanges({ value }: SimpleChanges): void;
Parameters
NameTypeDescription
{ value }
SimpleChanges
Returns
void
Overload #1

No documentation has been provided.

Presentation
ngOnChanges({ value }: SimpleChanges): void;
Parameters
NameTypeDescription
{ value }
SimpleChanges
Returns
void

ngOnInit()

overrides DIControl

No documentation has been provided.

Presentation
ngOnInit(): void;
Returns
void

registerOnTouched()

inherited from DIControl

Method is called by the forms API.

Presentation
registerOnTouched(fn: () => void): void;
Parameters
NameTypeDescription
fn
inherited from registerOnTouched
() => void

callback function to register on touch

Returns
void
Overload #1

No documentation has been provided.

Presentation
registerOnTouched(fn: () => void): void;
Parameters
NameTypeDescription
fn
() => void
Returns
void
protected

setState()

No documentation has been provided.

Presentation
protected setState(isSelected: boolean): void;
Parameters
NameTypeDescription
isSelected
boolean
Returns
void

toggle()

inherited from DIStateControl

Toggles checked state

Presentation
toggle(): void;
Returns
void
Overload #1

Toggles checked state

Presentation
toggle(): void;
Returns
void

uncheck()

inherited from DIStateControl

Sets unchecked state

Presentation
uncheck(): void;
Returns
void
Overload #1

Sets unchecked state

Presentation
uncheck(): void;
Returns
void

updateModel()

overrides DIControl

Updates the model of the current control. This is the main method that should be used to update the model.

Presentation
updateModel(value: boolean | T | null): void;
Parameters
NameTypeDescription
value
inherited from updateModel
boolean | T | null

new value.

Returns
void

writeValue()

inherited from DIControl

Method is called by the forms API to write to the view when programmatic changes from model to view are requested.

Presentation
writeValue(value: TModel | null): void;
Parameters
NameTypeDescription
value
inherited from writeValue
TModel | null
Returns
void
Overload #1

No documentation has been provided.

Presentation
writeValue(value: TModel | null): void;
Parameters
NameTypeDescription
value
TModel | null
Returns
void