localePath issue
In nuxt 2 I have this code to generate links to a given route name:
According to this:
https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22
params
is now ignored in vue-router:
I have read the docs, but the language is confusing to me. I don't understand how to rewrite it to make it work as intended.
Can someone ELI5 what the recommended approach is?GitHub
router/CHANGELOG.md at main · vuejs/router
🚦 The official router for Vue.js. Contribute to vuejs/router development by creating an account on GitHub.
3 Replies
Hi, have you tried
?
Or, if you use i18n,
With router I get
Error: No match for { "name":"sitename","params":{"site":"mySite","module":"messages","group":"private" }}
For some reason I can access sitename/messages/private
directly with no issues, but if I want to retrieve the url with localePath its not found.If your route is /sitename/messages/private shouldnt the name be "sitename-messages-private"?
you can console.log the "router" variable from useRouter to see all your generated route names