Angular - Loading image
Package for Loading image - angular Projects,This Library provides HTTP Interceptor, Its listen all the HTTP requests and show the Loading Info. You Can manullay load or hide the loading image also.
Installation
$ npm install ngg-loading --save
Usage
This will Interceptor,So for triggering the Loading image please use HttpClientModule
Import LoadingModule
,HttpClientModule
in app.module.ts:
// Import library module;;
Add the service in the component you are going to use
;
In Template Use the directive
Customization
Propery | Uses |
---|---|
bgColor | Used to change the background color of overlay div, It uses rgba value, Default value is rgba(0,0,0,0.5) |
loading_img | Any Gif or svg image (size your convinient) |
You can also manually show hide the loader using show()
and hide()
methodes in LoadingService
License
The MIT License (MIT)