T
T
Tshmt2019-12-03 03:59:30
JavaScript
Tshmt, 2019-12-03 03:59:30

How to change the behavior of Vue routera?

Hello.
There is an application on Nuxtjs. The task is to change the type of urls.
Now urls work like this, through query params

localhost:3000/main?color=silver&country=ukraine&code=4

in the components I refer this.$route.query.colorto for example, everything is ok.
But you need to bring the work of urls to this form
localhost:3000/main/color=silver/country=ukraine/code=4/

How can be done?
Is it possible in the router to change the separator &to/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TCloud, 2019-12-03
@OTCloud

There should be enough information for a solution, otherwise google further.
Getting Started
Aliases
Passing Input Parameters to Route Components

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question