ng2-events
Version:
Supercharge your Angular2+ event handling
32 lines (31 loc) • 880 B
TypeScript
import { MyEventManagerPlugin } from "../__util/event-manager-plugin";
import * as i0 from "@angular/core";
/**
* Listen to events without triggering change detection
*
* Usage:
* <button (undetected.click)="handleClick()"></button>
*
* ...
*
* export class ExampleComponent implements OnInit {
*
* constructor(private zone: NgZone) {}
*
* handleClick() {
* if(someCondition) {
* this.zone.run(() => {
* ...
* });
* }
* }
* }
*
*/
export declare class UndetectedEventPlugin extends MyEventManagerPlugin {
constructor(doc: any);
supports(eventName: string): boolean;
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
static ɵfac: i0.ɵɵFactoryDeclaration<UndetectedEventPlugin, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<UndetectedEventPlugin>;
}