istef-ng-notifications
v1.0.0
Published
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
Downloads
7
Maintainers
Readme
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.