istef-ng-notifications
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

IstefNgNotifications

Basic notifications widget for your Angular projects.
Clips to the bottom right of the web page.
Message type/color : success / green - error / red - info / blue

Install

npm i istef-ng-notifications

Use

Add <istef-ng-notifications></istef-ng-notifications> to the component html, where you want notifications displayed.

Inject NotificationsService in your service/s and call the corresponding method:

  • addSuccessMessage()
  • addErrorMessage()
  • addInfoMessage()

like that:

.pipe(
    tap(  
        () => this.notifications.addSuccessMessage('...'),
        (err) => this.notifications.addErrorMessage('...', 10)
)

where the second argument (optional) is the display time of the notification (in seconds, default 5s).

Other

This library was generated with Angular CLI version 14.0.0.

Package Sidebar

Install

npm i istef-ng-notifications

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

62.8 kB

Total Files

16

Last publish

Collaborators

  • stefan_bk