vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.77k stars 1.16k forks source link

Props not working with vue-router #2119

Closed Faryyaz closed 6 months ago

Faryyaz commented 6 months ago

Reproduction

https://codesandbox.io/p/sandbox/vue-router-forked-5xd2tn?file=%2Fsrc%2Fmain.js%3A15%2C34-16%2C4

Steps to reproduce the bug

  1. Open the codesandbox link
  2. Click on the link Go on the page detail

Expected behavior

The id param should be displayed. Even though it has not been defined in the router config:

path: "/detail/"

Actual behavior

The id param is undefined in console log and is not displayed on the page.

Additional information

No response

Faryyaz commented 6 months ago

For those searching for an answer. Please read:

https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22

posva commented 6 months ago

Duplicate of https://github.com/vuejs/router/issues/1527