3.0.2
https://codesandbox.io/s/lykxn57kr7
Access $route.params[0] for route with a *.
The matched part is returned.
Value is undefined. The value is at pathMatch property instead.
https://github.com/vuejs/vue-router/pull/1995/files (@posva) has done a change that changes from having 0 property on the params object to having pathMatch.
I would argue that this is an API breaking change and should be done in a major version release. I would, but params object is not documented very well so it's hard to reason about. (see https://router.vuejs.org/api/#route-object-properties)
As the damage is done already, maybe you can use this bug to improve on documentation and state in documentation for $route.params where the matched part is exposed for routes that are using *.
I would argue that this is an API breaking change and should be done in a major version release. I would, but params object is not documented very well so it's hard to reason about. (see https://router.vuejs.org/api/#route-object-properties)
As the damage is done already, maybe you can use this bug to improve on documentation and state in documentation for $route.params where the matched part is exposed for routes that are using *.
Exactly! That was seen as a bugfix because having a param named as 0 was breaking applications in some cases and it wasn't documented. So this won't go into a major version. The docs haven't been updated yet. I plan to do it this weekend once I have time but, as always, I'm open to contributions 馃槈
This was added to docs in the Dynamic Matching section
Most helpful comment
Exactly! That was seen as a bugfix because having a param named as 0 was breaking applications in some cases and it wasn't documented. So this won't go into a major version. The docs haven't been updated yet. I plan to do it this weekend once I have time but, as always, I'm open to contributions 馃槈