NgxLoadingSkeleton
DEMO
Install the library
npm i ngx-loading-skeleton --save
Import the module:
imports: ;
Once you include the module, you will get following list of components you can use:
and also you got one service:
LoadingSkeletonService;
Usage
<loading-placeholder>
This is basic buidling block for all the available components:
Basiclly it means that if in the list doesn't contain such built-in component for your usecases. You can use <loading-placeholder></loading-placeholder>
to build one by yourself.
For example:
// loading-bullet.component.html
LoadingSkeletonService
changeMode(mode: 'light'|'dark'): void
changeMode(isDark: boolean ): void
You can use LoadingSkeletonService to toggle dark / light mode.
;this.loadingService.changeModeisDark; // set dark modethis.loadingService.changeMode"dark"; // set dark modethis.loadingService.changeMode!isDark; // set light modethis.loadingService.changeMode"light"; // set light mode
Configuration
You can set backgroundColor
, fontColor
and animationSpeed
.
imports: ;