1.0.2 • Published 4 years ago

cdl-notification v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Notification

This is simple notification npm packege. We can use this packege to display INFO, WARN and ERROR type messages.

Installation instruction

npm install cdl-notification --save

Instruction to use the package

How to use?

Please follow below instruction to implement notification in your angular application.

//in module
import { NotificationModule } from 'cdl-notification'; 

imports: [
    NotificationModule
]

// In your component html file
<cdl-notification></cdl-notification>

// In your component ts file
import { MessageType, NotificationComponent } from 'cdl-notification';

export class AppComponent implements OnInit {

    @ViewChild(NotificationComponent, { static: true }) notifier: NotificationComponent;

    ngOnInit() {
        // To display Info message
        this.notifier.show(MessageType.INFO, 'This is simple info message');

        // To display Warn message
        this.notifier.show(MessageType.WARN, 'This is simple warn message');

        // To display Error message
        this.notifier.show(MessageType.ERROR, 'This is simple error message');
    }
}