import { Component, Input, ViewChild } from "@angular/core"; import { NotificationsService } from "../../../src/angular/notifications/services/notifications.service"; import { NotificationSettings } from "../../../src/angular/notifications/utilities/notification.config"; import { InnerNotifContent } from "../../../src/angular/notifications/notification-inner-content-example.component"; @Component({ selector: "notifications-example", template: `
Send Success Notification
Send Warning Notification
Send Info Notification
Send Success MultipleLine Notification
Send Success Custom Notification
` }) export class NotificationsExample { constructor(private notifsService : NotificationsService) { } sendSuccessNotif() { this.notifsService.push(new NotificationSettings("success", 'notif success message test', 'Notif Title Success')); } sendMultipleLinesSuceessNotif() { this.notifsService.push(new NotificationSettings("success", 'notif success message test with a lot of test so we can test multiple line case lets just add blabla bcdesfg hijklmnop qrstuvw xyz abcdesfg hijklmnop qrstuvw xyz', 'Notif Title Success')); } sendWarnNotif() { this.notifsService.push(new NotificationSettings("warn", 'notif warn message test', 'Notif Title Warn')); } sendInfoNotif() { this.notifsService.push(new NotificationSettings("info", 'notif info message test', 'Notif Title Info')); } sendSuccessCustomNotif() { this.notifsService.push(new NotificationSettings( "info", 'notif XYZ', 'Notif Custom XYZ', 10000, false, true, InnerNotifContent, { notifyText : "notif info custom inner message test", notifyTitle : "Notif Custom Inner Title Info"})); } }