1.0.0 • Published 5 years ago
ngx-status-bar v1.0.0
ngx-status-bar
An Angular 7 status bar component.
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