The layout.service.ts was changed quite a bit.
But this is only a once off thing
app.component.html
<dmx-notification-popup></dmx-notification-popup>app.component.ts
Imports
import { LayoutService } from "./shared/layout.service";
import { NotificationItemModel } from "./shared/components/notification-popup/notification-item.model";Class
export class AppComponent implements OnInit, OnDestroy {
userNotification: NotificationItemModel;Constructor
constructor(
private layoutService: LayoutService,ngOnInit
ngOnInit() {
this.layoutService.notifyUser$
.pipe(takeWhile(() => this.alive))
.subscribe((notification: NotificationItemModel) => {
this.userNotification = notification;
});app.module.ts
Import
import { NotificationPopupComponent } from "./shared/components/notification-popup/notification-popup.component";NgModule
@NgModule({
declarations: [
NotificationPopupComponentComponent
Import
import { LayoutService } from "../shared/layout.service";Constructor
constructor(
private layoutService: LayoutService,Call the notification
this.layoutService.showUserNotification({ showModal: true, messageText: this.languageService.translate("Label already in use"), success: false });
return;