UNPKG

ng2-events

Version:

Supercharge your Angular2+ event handling

28 lines (27 loc) 1.07 kB
import { InjectionToken } from "@angular/core"; import { MyEventManagerPlugin } from "../__util/event-manager-plugin"; import * as i0 from "@angular/core"; export declare const SCROLL_EVENT_TIME: InjectionToken<string>; /** * Detects when an element is scrolled into or out of the viewport * * Usage: * <div (scroll-in)="activate()" (scroll-out)="deactivate()">...</div> * * The matching handler of the initial status is called upon attaching * to notify the element of its current status. $event is true for the * initial call, false otherwise * */ export declare class ScrollEventPlugin extends MyEventManagerPlugin { private listeners; private globalListener; private subject; constructor(doc: any, time: number); supports(eventName: string): boolean; addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; private updateGlobalListener; private getStatus; static ɵfac: i0.ɵɵFactoryDeclaration<ScrollEventPlugin, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ScrollEventPlugin>; }