This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Actionable System Notifications
- New component to create CBP Theme styled toast notifications.
- Notifications can be created using as simple as calling
CBPNotificationsService.notify(notification: CBPNotification)passing in textual message and typetype?: 'success' | 'danger' | 'warning' | 'info'; - You can also project your markup by passing your
TemplateRefas shown below and in e.g. DemoNotificationsComponent.notifyWarning
@ViewChild('warnNotification') warnNotificationRef: TemplateRef<any>;
notifyWarning() {
this.snoozingNotification = new CBPNotification();
this.snoozingNotification.type = 'warning';
this.snoozingNotification.content = this.warnNotificationRef;
this.notificationService.notify(this.snoozingNotification);
}- Provided actions in the template will get the the local.
CBPNotificationsService.snooze(notification: CBPNotification, wakeUpAfter = 5000)can snooze a notification and it will reappear after the wake up time is elapsed.- Notification can be programmatically closed by calling
close()on the notification object. CBPNotification.isOpen(): Observable<boolean>to observe if open.- BREAKING
cbp-toggle-switchnow accepts projection of ngModel instead ofisOnproperty.
