Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ngx-status-bar with all npm packages installed. Try it out:

require("@angular/common/package.json"); // @angular/common is a peer dependency. require("@angular/core/package.json"); // @angular/core is a peer dependency. var ngxStatusBar = require("ngx-status-bar")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ngx-status-bar v1.0.0

An Angular 7 status bar component.

ngx-status-bar

An Angular 7 status bar component.

NPM Build Status

Install

$ npm install --save ngx-status-bar

Usage

// in app.module.ts
import { NgxStatusBarModule } from 'ngx-status-bar';

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    NgxStatusBarModule,
    ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
<!-- in app.component.html -->
<ngx-status-bar></ngx-status-bar>
// in app.component.ts
import { NgxStatusBarService } from 'ngx-status-bar';

// ...
export class AppComponent {

  constructor(
    private statusBar: NgxStatusBarService
  ) { }

  setStatus(message: string) {
    this.statusBar.success(message);
  }
}
/* Make sure you set these properties in styles.(s)css */
html, body {
  height: 100%;
  margin: 0;
}

Licence

MIT © Peter Freeman

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free