dominique-mueller / angular-notifier

A well designed, fully animated, highly customizable, and easy-to-use notification library for your Angular application.
https://www.npmjs.com/package/angular-notifier
MIT License
247 stars 68 forks source link

Access particular `NotifierNotificationComponent` to subscribe for dismiss event #206

Open ysrepo opened 3 years ago

ysrepo commented 3 years ago

Hello,

Could someone advise is it possible to subscribe for the dismiss event from outer app?

More details: I use custom template and I pass the notification context which is typeof NotifierNotificationOptions. Then, as I've seen, passed context gets processed somehow and in the end there is field public notification: NotifierNotification; in the NotifierNotificationComponent. NotifierNotification contains the reference to the component, so the logical question: is it possible to access that field containing component reference from custom template using context variable? I'm asking 'cause I haven't found where that field gets initialized; for me seems it should be initialized either in the ngAfterViewInit() or in the setup() which is also withinngAfterViewInit()

ysrepo commented 3 years ago

Other words: if I set breakpoint to the ngAfterViewInit():126, then this.notification.component is undefined. Seems missed init for this field