vue-snotify
vue-snotify copied to clipboard
Notifications persist when navigating routes before notification disappears with vue-router
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.
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.
https://github.com/artemsky/vue-snotify/issues/27
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.