9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement
ts
function addWeakEventListener(
   source: Observable, 
   eventName: string, 
   handler: (eventData: EventData) => void, 
   target: any): void;

Defined in: ui/core/weak-event-listener/index.d.ts:10

Attaches a WeakEventListener.

Parameters

ParameterTypeDescription
sourceObservableObservable class which emits the event.
eventNamestringThe event name.
handler(eventData: EventData) => voidThe function which should be called when event occurs.
targetanySubscriber (target) of the event listener. It will be used as a thisArg in the handler function.

Returns

void

Next
alert