This is a simple notification bar component for Angular2.
Inspired by ng-notifications-bar - in angular 1.
npm install angular2-notification-bar --save
import { NotificationBarModule } from 'angular2-notification-bar'
import { AppComponent } from './app.component';
@NgModule({
imports: [BrowserModule, FormsModule, NotificationBarModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {
}
<notification-bar></notification-bar>
this.notificationBarService.create({ message: 'USER_SAVED', type: NotificationType.Success});
message: string;
type?: NotificationType;
autoHide?: boolean;
hideDelay?: number;
isHtml?: boolean;
allowClose?: boolean;
hideOnHover?: boolean
MIT