ng-image-loader
v0.0.6
Published
The simplest solution for Image Loader in Angular.
Downloads
18
Readme
Image Loader for Angular
The simplest solution for Image Loader in Angular.
Demo
Check out the example here: https://github.com/hmake98/NgImageLoader/tree/main/projects/ng-image-loader-example
Quick Start
npm i ng-image-loader --save
Usage
Import NgImageLoader
in your app and start using component:
<Ngx-NgImageLoader [imageHeight]="300" [imageWidth]="500" [source]="src" type="blur" errorImage=""> </Ngx-NgImageLoader>
<Ngx-NgImageLoader>
: Contains image.[source]="string"
Image source of any type.type="'placegholder'|'blur'"
Indicates the type of image loader Default is 'blur'.errorImage="string"
Indicates if image coudn't load then it'll load the placeholder image.imageHeight="number"
Indicates image height.imageWidth="number"
Indicates image width.
Angular Version
This library is built to work with Angular 5+, and support ahead-of-time compilation. If you need to support an earlier or pre-release version of Angular for now, please see the changelog for advice on which version to use.
Module Format
This library ships as a "flat ES module" (FESM). This means that all the JavaScript code is located in a single ES5-compatible file, but makes use of ES2015 import
and export
statements.
Webpack, Systemjs and Rollup all support this format and should work without problems.
A UMD bundle is also provided for systems which do not support FESM.
License
MIT