You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ngp-lazy-image

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

ngp-lazy-image

It is a directive developed in angular for the lazy loading of images

0.0.8
unpublished
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NgpLazyImage

It is a directive developed in angular for the lazy loading of images

Installation

npm i ngp-lazy-image --save

Usages

You must import the module NgpImageLazyLoadModule where you will use it.

***
import { NgpImageLazyLoadModule } from 'ngp-lazy-image';
@NgModule({
  ***
  imports: [
    NgpImageLazyLoadModule,
  ],
****
})

The ngp-lazy directive is placed on each img tag that requires lazy loading of the image:

<img ngp-lazy [src]="image.image" />

More configuration

You can change the detection threshold of the image and the opacity to load time to give a better transition to the user

<img
  src="https://images8.alphacoders.com/468/thumb-1920-468739.jpg"
  ngp-lazy
  ngp-threshold="0.1"
  ngp-opacity-duration="1.5s"
/>

More examples

Image Rating

Keywords

angular

FAQs

Package last updated on 19 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts