EventManager
通过浏览器插件为 Angular 提供事件管理的可注入服务。
An injectable service that provides event management for Angular through a browser plug-in.
class EventManager {
constructor(plugins: EventManagerPlugin[], _zone: NgZone)
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function
addGlobalEventListener(target: string, eventName: string, handler: Function): Function
getZone(): NgZone
}
构造函数
初始化事件管理器服务的实例。 Initializes an instance of the event-manager service. |
方法
在目标视图中注册全局事件处理器。 Registers a global handler for an event in a target view. | |||||||||
Deprecated No longer being used in Ivy code. To be removed in version 14. 参数
返回值可用于删除处理器的回调函数。
|
检索在其中注册了事件侦听器的编译 Zone。 Retrieves the compilation zone in which event listeners are registered. |