UNPKG

@ngfly/carousel

Version:

A smooth, customizable carousel component for Angular 17+ applications

32 lines (31 loc) 1.1 kB
import { ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import * as i0 from "@angular/core"; /** * LazyLoadDirective * * A directive for lazy loading images in a carousel component. * Uses Intersection Observer API to detect when images enter the viewport. */ export declare class LazyLoadDirective implements OnInit, OnDestroy { private el; private renderer; carouselLazyLoad: string; errorImage: string; private observer; private isLoaded; constructor(el: ElementRef, renderer: Renderer2); /** * Initialize the directive and set up the Intersection Observer */ ngOnInit(): void; /** * Clean up the observer when directive is destroyed */ ngOnDestroy(): void; /** * Load the image by setting the src attribute */ private loadImage; static ɵfac: i0.ɵɵFactoryDeclaration<LazyLoadDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<LazyLoadDirective, "[carouselLazyLoad]", never, { "carouselLazyLoad": "carouselLazyLoad"; "errorImage": "errorImage"; }, {}, never, never, true>; }