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

Error in demo: Displaying the notification with the same ID #121

Open vajnorcan opened 5 years ago

vajnorcan commented 5 years ago

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

dominique-mueller commented 5 years ago

Can be reproduced. If a notification should be opened with an ID that already exists, angular-notifier should either:

I'd favour the second approach, PR's are welcome.