File

src/lib/services/sz-element-resize-listener.service.ts

Description

A service to ease to do the heavy lifting of adding/removing listeners for resize events on specific dom elements. Used primary by #SzElementResizeObserverDirective for adding resize event listening to elements.

Index

Methods

Constructor

constructor(ngZone: NgZone)
Parameters :
Name Type Optional
ngZone NgZone No

Methods

Public addListener
addListener(ele: Element, cb: SzElementResizeObserverCallback)

add a new callback to be executed on element resize

Parameters :
Name Type Optional
ele Element No
cb SzElementResizeObserverCallback No
Returns : void
Public removeEventListener
removeEventListener(ele: Element)

remove a resize listener for an element

Parameters :
Name Type Optional
ele Element No
Returns : void

results matching ""

    No results matching ""