How can I show the bootloader when the router changes in vue 2

I am trying to show a spinner for every router change in vue 2. I added a flag in the created method to show the bootstrap and after I have ever stopped the bootloader. It doesn't work at all.

Are there any other solutions to achieve this?

Thanks in advance.

+3


source to share


1 answer


You can also use navigation guards to set a beforeEach method that will run before each new route is entered: https://router.vuejs.org/en/advanced/navigation-guards.html



+2


source







All Articles