N
Nuxt4w ago
Kerensky

VueRouter repeating params support?

Does Nuxt's file based routing support vue routers repeating params option (https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Repeatable-params)?
Vue Router
The official Router for Vue.js
2 Replies
kapa.ai
kapa.ai4w ago
Hi @Kerensky. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, there isn't explicit information about Nuxt supporting Vue Router's repeating params feature directly in its file-based routing system. The knowledge sources cover various aspects of Nuxt routing, including: - Dynamic routes using square brackets syntax like [id].vue Dynamic Routes - Catch-all routes using [...slug].vue syntax Catch-all Route - Optional parameters using double square brackets like [[slug]].vue Dynamic Routes However, there's no specific mention of support for repeating params (the * modifier in Vue Router that allows a parameter to repeat in the path). There is a GitHub issue (#14720) discussing support for regex in routes, which is somewhat related, but it doesn't specifically address repeating params. The discussion mentions potentially adding custom regex support to route parameters, but it doesn't confirm implementation of the repeating params feature. For complex routing needs that go beyond Nuxt's file-based routing capabilities, you might need to use the useRouter() composable which wraps the underlying Vue Router and allows manual interaction with routes, as mentioned in one of the Stack Overflow answers. If you need to handle deeply nested routes with unpredictable nesting levels, the catch-all route syntax [...slug].vue might be your best option, as it will capture all segments of the path in an array. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@482370610626953227> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?