hannoeru / vite-plugin-pages

File system based route generator for ⚡️Vite
MIT License
1.84k stars 127 forks source link

Route with params/props (Not in URL) #358

Closed iampapagray closed 1 year ago

iampapagray commented 1 year ago

What structure should be used to generate a route that accepts a param(s).

Eg.

i have pages/verify.vue which produces a verify route. However when i use

router.push({ name: 'verify', params: {phone: '+18383'} })

the route is changed to the verify page but the params are discarded because they were not preset on the route.

What to do to solve this issue without without switching to manual route definitions? NOTE: I prefer not to have the param values in the url!

jbaubree commented 1 year ago

I think this link will help you https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22