0.0.5 • Published 4 years ago
way2ui-angular-loader v0.0.5
Way2UI Angular Loader!
This package contains Angular loader. It is very easy to use. Please follow the below steps to setup in your Angular project.
Install package
npm install --save way2ui-angular-loader
Add the Module inside app.module.ts
file
import { AngularLoaderModule } from 'way2ui-angular-loader';
@NgModule({
declarations: [
...
AppComponent
],
imports: [
...
AngularLoaderModule
],
providers: [],
bootstrap: [AppComponent]
})
Add the html element into app.component.html
file
<loader></loader>
Add the service file dependency to your component or service
import { AngularLoaderService } from 'way2ui-angular-loader';
constructor(
public loaderService: AngularLoaderService
) {
// to activate loader, call the setLoader with true
this.loaderService.setLoader(true);
// to de-activate loader, call the setLoader with false
this.loaderService.setLoader(false);
}
UML diagrams
sequenceDiagram
Way2uiAngularLoaderModule->> app.module.ts: Register the module inside imports array
app.component.ts->> app.module.ts :
Way2uiAngularLoaderService->>app.component.ts: Add the dependency to constructor and call the setLoader fn
app.component.ts->>app.component.html: Add the html element into this file