0.0.3 • Published 7 years ago
@tickify/ngx-notification v0.0.3
ngx-notification
Demo
https://tickify.github.io/ngx-notification/index.html
npm install @tickify/ngx-notification
yarn add @tickify/ngx-notificationNgxNotificationModule
You need registering this module before you can use this library.
- Import module from
@tickify/ngx-notificationimport { NgxNotificationModule } from '@tickify/ngx-notification';
- Register module to other module which use
@tickify/ngx-notification@NgModule({ declarations: [AppComponent], imports: [BrowserModule, NgxNotificationModule], providers: [], bootstrap: [AppComponent] }) export class AppModule {}
NotificationManager
This class manage all push or remove notification actions. Inject
NotificationManagerif you want to push notifications.constructor(private notificationManager: NotificationManager) {Push Notification
Call push function on
NotificationManagerto show notification.this.notificationManager.push({ message: new Date().getTime().toString() })This function return a object which is used when you want to remove that notification.
Remove Notification
Call remove function on
NotificationManagerto hide notification.this.notificationManager.hide(this.notification);
this.notificationis object which is return when you callthis.notificationManager.pushfunction.
AUI
<link rel="preload" href="https://unpkg.com/@atlassian/aui@7.8.1/dist/aui/css/fonts/adgs-icons.woff" as="font">
<link rel="preload" href="https://unpkg.com/@atlassian/aui@7.8.1/dist/aui/css/fonts/adgs-icons.ttf" as="font">
<link rel="preload" href="https://unpkg.com/@atlassian/aui@7.8.1/dist/aui/css/fonts/adgs-icons.eot" as="font">
...
<link href="https://unpkg.com/@atlassian/aui@7.8.1/dist/aui/css/aui.min.css" rel="stylesheet" />Contribution
License
Copyright (c) 2018-present, HieuNV