File

libs/upp-wdgt/src/directives/upp-touch.ts

Description

A custom Angular directive to handle touch and click events on an element. This directive emits events for various touch and click interactions outside of Angular's zone to improve performance.

Implements

AfterViewInit

Metadata

Index

Methods
Outputs

Constructor

constructor(el: ElementRef, zone: NgZone)

Constructor

Parameters :
Name Type Optional Description
el ElementRef No
  • Reference to the host DOM element where the directive is applied.
zone NgZone No
  • Angular's NgZone service for running code inside or outside the Angular zone.

Outputs

TouchClick
Type : EventEmitter

EventEmitter: TouchClick

Emits when a click event is triggered on the host element.

TouchLeave
Type : EventEmitter

EventEmitter: TouchLeave

Emits when a touchend, touchcancel, touchleave, or touchmove event is triggered on the host element.

TouchStart
Type : EventEmitter

EventEmitter: TouchStart

Emits when a touchstart event is triggered on the host element.

Methods

ngAfterViewInit
ngAfterViewInit()

Lifecycle Hook: ngAfterViewInit

Runs after the view has been initialized. Sets up event listeners for various touch and click events on the host element.

Returns : void

results matching ""

    No results matching ""