ToggleComponent
Defined in: components/toggle/toggle.component.ts:18
A simple switch component that allows the user to toggle between two states (on/off, true/false).
Since
1.1.0
Author
Simon Kovtyk
Implements
AfterViewInitOnDestroy
Constructors
Constructor
new ToggleComponent(): ToggleComponent;Returns
ToggleComponent
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
children | readonly | Signal<readonly ToggleChildComponent[]> | components/toggle/toggle.component.ts:36 |
defaultIndex | readonly | InputSignal<number | undefined> | components/toggle/toggle.component.ts:32 |
defaultName | readonly | InputSignal<string | undefined> | components/toggle/toggle.component.ts:30 |
index | readonly | Signal<number> | components/toggle/toggle.component.ts:21 |
name | readonly | Signal<string | undefined> | components/toggle/toggle.component.ts:26 |
reverse | readonly | InputSignalWithTransform<boolean, unknown> | components/toggle/toggle.component.ts:28 |
toggleChange | readonly | OutputEmitterRef<ToggleChange> | components/toggle/toggle.component.ts:34 |
viewContainerRef | readonly | Signal<ViewContainerRef> | components/toggle/toggle.component.ts:38 |
Methods
ngAfterViewInit()
ngAfterViewInit(): void;Defined in: components/toggle/toggle.component.ts:154
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
void
Implementation of
AfterViewInit.ngAfterViewInitngOnDestroy()
ngOnDestroy(): void;Defined in: components/toggle/toggle.component.ts:165
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Returns
void
Implementation of
OnDestroy.ngOnDestroyshowIndex()
showIndex(visibleIndex): void;Defined in: components/toggle/toggle.component.ts:92
Activates the toggle child at the given index
Parameters
| Parameter | Type | Description |
|---|---|---|
visibleIndex | number | The index of the child to activate |
Returns
void
Since
1.0.0
Author
Simon Kovtyk
showName()
showName(visibleName): void;Defined in: components/toggle/toggle.component.ts:65
Activates the toggle child at the given name
Parameters
| Parameter | Type | Description |
|---|---|---|
visibleName | string | The name of the child to activate |
Returns
void
Since
1.0.0
Author
Simon Kovtyk
showNext()
showNext(): void;Defined in: components/toggle/toggle.component.ts:118
Moves the toggle to display the next item
Returns
void
Since
1.0.0
Author
Simon Kovtyk
showPrevious()
showPrevious(): void;Defined in: components/toggle/toggle.component.ts:133
Moves the toggle to display the previous item
Returns
void
Since
1.0.0
Author
Simon Kovtyk
toggle()
toggle(): void;Defined in: components/toggle/toggle.component.ts:148
Toggle's action
Returns
void
Since
1.0.0
Author
Simon Kovtyk