pages route params error
See original GitHub issueEnvironment
nuxt: rc-12 node: v16.18.0 pnpm: 7.14.0 apple m1 max macos: 13.0
Reproduction
https://stackblitz.com/edit/github-pespjr?file=pages%2Fprice_[nid]_[sid].vue,pages%2Findex.vue
Describe the bug
route params error
Additional context
in my mind price_[nid]_[sid].vue /price_123_456 get {nid: 123, sid: 456}
Logs
get { "nid_": "1", "sid": "23_456" }
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
React Router URL Throws Error With Parameter
I am trying to use react router to have dynamic profile pages, preferably having it in slashes rather than like a ? parameter...
Read more >Errors when parameters or arguments are missing for route
Sometimes, route parameters or arguments are not available for a specific route because they are dependent on the current page that is loaded...
Read more >Error when refreshing pages using $route param - Vue Forum
The $route. param will disappear after refreshing pages. You could try $route. query to transfer your data.
Read more >Error with Params on first load of page on Real Device
I want to use the path /groups/detail/xxx for a group with id = xxx, and I'm using links like that. So my route...
Read more >Routing in Razor Pages
Routing is the system that matches URLs to Razor pages. Like most page-centric frameworks, the primary routing system in ASP.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Even if not ideal for SEO, using underscores should not affect params though.
Update: this is, if all, a vue-router issue though. See this example that shows the regex for
_
vs.-
. So please file an upstream issue there ☺️For now, the workaround would be to use
pages.extends
and narrow down the parameters via regex if you want to keep using_
. It would be easier to switch to-
though.how u diff this [city-code].vue like /beijing/ or /shanghai/ [car-type].vue like /zixie/ or /zhongka/
routes middleware? or diff component?