1.0.0 • Published 2 years ago

@ildug/ngx-loader v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ngx-loader

Publish Node Package

spinner loader directive for angular project

Install

npm i @ildug/ngx-loader

Usage

Import the module NgxLoaderModule into the main module of App.

...
import { NgxLoaderModule } from 'ngx-loader';


@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        ...,
        NgxLoaderModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

Use th structural diretcive in Template. Prefix the directive with *.

Use a variable to trigger the spinner. Always use a parent container or div.

    <div class="box">
        <div *dagLoader="loading">
            <h1>B</h1>
        </div>
    </div>

with options:

    <div class="box">
        <div *dagLoader="loading; color:'#e4b2b2'; fullScreen: false; type:'pulsing';">
            <h1>B</h1>
        </div>
    </div>

Options

color:Spinner color as HEX string
fullScreen:whether spinner cover the parent element or the whole screen.
type:*spinner type. Select between PULSING (default), BOUNCING or SPINNER.
1.0.0

2 years ago

0.2.0

3 years ago

0.1.0

4 years ago