angular2-imagelazyload-directive
Install
npm i angular2-imagelazyload-directive --save
data-src
, width
and height
Import the directive to your project and use it in your images specifing a ;
By default the directive has a 300px threshold, meaning the image will be loaded 300px before it became visible in the viewport. You can change that by passing a threshold attribute to your img
tag.
Also by default the images are fading-in in a duration of 1000ms, you can disable that with the fadeIn
attribute or specify the duration using the fadeInDuration
(default 1000ms)
Contribute
Any pull-request is more than welcome 💥 😄
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.
License
MIT