NativeRefToggleTriggerDirective
Defined in: directives/toggle/native-ref-toggle-trigger.directive.ts:15
Directive that turns a host element into a toggle trigger for a target native HTML element. The directive listens for a configured DOM event on the host and applies custom toggle logic to the referenced element.
Since
1.1.0
Author
Simon Kovtyk
Implements
OnInitOnDestroy
Constructors
Constructor
new NativeRefToggleTriggerDirective(): NativeRefToggleTriggerDirective;Returns
NativeRefToggleTriggerDirective
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
trigger | readonly | InputSignal<HTMLElement> | undefined | Target native HTML element controlled by this trigger. Required. | directives/toggle/native-ref-toggle-trigger.directive.ts:23 |
triggerEvent | readonly | InputSignal<string> | "click" | Name of the DOM event on the host element that activates the trigger. | directives/toggle/native-ref-toggle-trigger.directive.ts:29 |
Methods
ngOnDestroy()
ngOnDestroy(): void;Defined in: directives/toggle/native-ref-toggle-trigger.directive.ts:35
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Returns
void
Implementation of
OnDestroy.ngOnDestroyngOnInit()
ngOnInit(): void;Defined in: directives/toggle/native-ref-toggle-trigger.directive.ts:31
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
Implementation of
OnInit.ngOnInit