EventManager
An injectable service that provides event management for Angular through a browser plug-in.
API
class EventManager {
constructor(plugins: EventManagerPlugin[], _zone: NgZone): EventManager;
addEventListener(element: HTMLElement, eventName: string, handler: Function, options?: ListenerOptions | undefined): Function;
getZone(): NgZone;
}
constructor
EventManagerInitializes an instance of the event-manager service.
@returns
EventManager
addEventListener
FunctionRegisters a handler for a specific element and event.
@paramelement
HTMLElementThe HTML element to receive event notifications.
@parameventName
stringThe name of the event to listen for.
@paramhandler
FunctionA function to call when the notification occurs. Receives the event object as an argument.
@returns
FunctionA callback function that can be used to remove the handler.
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/platform-browser/EventManager