npm.io
7.0.1 • Published 9 months ago

@ngx-loading-bar/router

Licence
MIT
Version
7.0.1
Deps
1
Size
20 kB
Vulns
0
Weekly
0
Stars
787

@ngx-loading-bar/router

A fully automatic loading bar with zero configuration for angular app (http, http-client and router).

1. Install @ngx-loading-bar/router

  npm install @ngx-loading-bar/router --save

2. Import the LoadingBarRouterModule:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
import { AppComponent } from './app';

@NgModule({
  imports: [
    BrowserModule,
    RouterModule.forRoot(...),

    LoadingBarRouterModule,
  ],
  declarations: [ AppComponent ],
  bootstrap: [ AppComponent ],
})
export class AppModule {
}
3. Include ngx-loading-bar in your app component:
import { Component } from '@angular/core';

@Component({
  selector: 'app',
  template: `
    ...
    <ngx-loading-bar></ngx-loading-bar>
  `,
})
export class AppComponent {}

Keywords