@trendster-io/ng-lazy-image
Version:
An Angular directive to efficiently lazy load images using the IntersectionObserver API.
23 lines (22 loc) • 664 B
TypeScript
import { ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
export declare class LazyImageDirective implements OnChanges, OnDestroy {
private el;
private io;
src: string;
root: Element;
rootMargin: string;
threshold: number | number[];
willLoad: EventEmitter<void>;
srcAttr: string;
decodingAttr: string;
readonly visibilityStyle: string;
constructor(el: ElementRef<Element>);
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
private canLazyLoad;
private load;
private lazyLoadImage;
private loadImage;
private addIO;
private removeIO;
}