Answer the question
In order to leave comments, you need to log in
How to dynamically add a parameter to a route (nuxt)?
Hello. The pages folder has the following structure:
pages/resume/list
When following this route, 10 cards are drawn, and pagination is displayed in the page header. When I click on the second page, I draw the next 10 cards, but this is not reflected in the route. Nuxt builds routes according to the structure in the Pages folder, I don't understand how to add some parameter to the route without changing the folder structure in pages. How do I add a parameter to the route, for example, page=n, where n = the current page, that the address was: ../resume/list/page=n, thanks
Answer the question
In order to leave comments, you need to log in
Nevertheless, https://ru.nuxtjs.org/guide/nested-routes/
is described in the dock.
You create a file _ page.vue and it will be called every time when there is a resume/list/page=n link inside, you get the passed parameter n and draw what did you want
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question