vue-snotify icon indicating copy to clipboard operation
vue-snotify copied to clipboard

Notifications persist when navigating routes before notification disappears with vue-router

Open nwsm opened this issue 7 years ago • 3 comments

If I have a notification active and navigate to a different route in my app with vue-router, the next time a notification is created, the original one pops up again.

I'm trying to fix this in my router.js with something like:

router.beforeEach((to, from, next) => { this.$snotify.clear(); })

but $snotify doesn't exist in that context.

nwsm avatar Feb 09 '18 19:02 nwsm

Save issue for me. But some different side. I want to use snotify in beforeEach loop. I know i cannot use before initialize view. I try to import root instance of vue, but nothing change. I'm getting undefined error. Normally in app i can use.

korhanozbek44 avatar Apr 29 '18 13:04 korhanozbek44

https://github.com/artemsky/vue-snotify/issues/27

artemsky avatar May 03 '18 20:05 artemsky

This would be great to have, is there any way of fixing this? I am thinking in the mounted function of each of my .vue files to do a clear for now.

mussrya avatar Dec 07 '18 16:12 mussrya