Skip to content

Stefan-B-K/istef-ng-notifications

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published