angular-notifier
angular-notifier copied to clipboard
Error in demo: Displaying the notification with the same ID
Hi there,
I came across a problem in my implementation of the angular-notifier and that is if you display the notificaiton with the same ID, let's say 5x, it will stop working displaying any. If you investigate the dom node, you can see some ghost elements in there
The same behavior can be observed in provided stackblitz https://stackblitz.com/edit/angular-notifier-demo
Just click the Show notification with ID named 'ID_TEST' button multiple times.
I think what the notifier should do in case of displaying a message with the same id that is already displayed, is to put it in the first position and not to allow any more instances of it, which I believe causes the issue here.
Thank you
Can be reproduced. If a notification should be opened with an ID that already exists, angular-notifier should either:
- block that notification (and perhaps throw an error?)
- hide the existing notification with that ID, then open the new notification
I'd favour the second approach, PR's are welcome.