LazyLoad Image source using directive in Angular.
Installation
npm i ngx-lazyload-image --save
Changelog
See the releases page on GitHub.
Usage
Add LazyLoadImagesModule
to your app module:
;
In your app component, simply use a [lazyload]
directive input, in place [src] in image tag.
Options
Inputs
Property name | Type | Description |
---|---|---|
lazyload | string | Source of the image which is to be lazyloaded. |
Outputs
Property name | Description |
---|---|
imageInViewEvent | Emitted when image comes in viewport |
imageInViewLoadedEvent | Emitted when image is loaded .( do thinsg like hide placeholder). |