ngx-intersection-observer
Version:
Intersection observer for Angular
33 lines (32 loc) • 1.45 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { ReplaySubject } from 'rxjs';
import { IntersectionObserverConfig } from './intersection-observer-config.model';
import * as i0 from "@angular/core";
export declare class IntersectionObserverService implements OnDestroy {
private intersectionObserverConfig?;
private _windowScrollY$;
private _windowResize$;
private _windowViewportChange$;
private _pageYOffset;
private _config;
private onScroll$;
private onResize$;
private scrollSub;
private resizeSub;
private viewportChangeSub;
constructor(intersectionObserverConfig?: IntersectionObserverConfig | undefined);
/** Gets the page offset Y axis */
get pageYOffset(): number;
/** Gets the intersection observer config */
get config(): IntersectionObserverConfig;
/** Gets an observable to the window scroll event */
get windowScrollY$(): ReplaySubject<number>;
/** Gets an observable to the window resize event */
get windowResize$(): ReplaySubject<number>;
/** Gets an observable to the window viewport event (combination of resize and scroll) */
get windowViewportChange$(): ReplaySubject<number>;
private manageScrollPos;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<IntersectionObserverService, [{ optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<IntersectionObserverService>;
}