how can I show loading spinner when changing router in vue 2

Viewed 5108

I have been trying to show a spinner on each router change in vue 2. I added a flag in created method to show the initial loading and after sometime I stopped the loading spinner. This doesn't work at all.

Is there any other solution to achieve this?

Thanks in advance.

1 Answers
Related