J
J
John2019-09-27 13:39:44
Vue.js
John, 2019-09-27 13:39:44

How to load routes from the server and then go to vue-router?

I can’t figure out how to preload routes asynchronously from the server, followed by following a given link using vue and vue-router.
It seems to me that this is somehow done by a method,
router.addRoutes()
but I can’t figure out how to do it.
There is an idea to do this not with vue tools, but with standard JS promises, but I would not want to fence the garden if there are some tools in the vue-router itself that I cannot find.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question