cdl-notification

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

Usage no npm install needed!

<script type="module">
  import cdlNotification from 'https://cdn.skypack.dev/cdl-notification';
</script>

README

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');
    }
}