Ng Lazy Load
Lazy loading images with Angular.
Table of Contents:
To install this library, run:
$ npm install @greg-md/ng-lazy-load --save
How It Works
Setting up in a module
;;// 1. Import lazy loading module;;;
Using in templates
By default images are loaded when they appear on the screen. If you want images to load earlier, use threshold parameter. Setting threshold to 200 causes image to load 200 pixels before it appears on viewport.
You can also use directive for images inside scrolling container, such as div with scrollbar. Just pass the container element.
Set default image in background and lazy load image directly in the
Useful with non-effective image URLs. This will avoid to load lazy image twice.
MIT © Grigorii Duca