Answer the question
In order to leave comments, you need to log in
How to run a specific function when refreshing a router vue.js 2.0 page?
How to find out the path of the vue.js router when loading the page and execute the parameters?
Example. There is a link site/users/:UserId
When you select a user, his data is loaded. But if I update, I can’t tie up the update function at startup.
That is, if the site/users/:UserId route is selected and the page has started, then you need to make a request to the server, and not only when you click on this link.
How to implement this?
Answer the question
In order to leave comments, you need to log in
https://router.vuejs.org/en/advanced/data-fetching.html
It is written in detail here, even with an example.
Don't forget about the created event.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question