[Vuejs]-Correct way to execute events on certain routes / pages using Vue

0👍

If you’re using Vue Router, you could put a beforeRouteEnter() route guard in the component. The router will call this whenever the user navigates to the route which displays that component. Alternatively, you could fetch the data in the page components mounted() method.

Leave a comment