Answer the question
In order to leave comments, you need to log in
Is it possible to make the route parameter not after the slash, but after the letter in Vue (2, 3)?
In vue router, you can make the following route: /page/:n
where n is a parameter, respectively, the page will be /page/1 , etc.
Is it possible to make the parameter NOT after the slash, so that you can make a page like this: /page1 ?
This implementation in Nuxt is especially interesting when using routing on files.
Answer the question
In order to leave comments, you need to log in
You can use regular expressions in path:
{
path: "/page:id([0-9]+)", ...
}
Why not just do it then /:n
?
In nuxt in the page root directory, create _id.vue
everything
PS
This implementation in Nuxt is especially interesting when using routing on files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question