Closed jcmillett closed 10 months ago
This is working as expected. See https://router.vuejs.org/guide/migration/#Removal-of-the-exact-prop-in-router-link- and the mentioned RFC for more details. In your case, it's all about what router.resolve('/foo')
resolves to and you will likely have to write your custom logic for is active if you want { name: 'foo' }
to be active when the route is { name: 'foo', params: { id: ... }}
.
Reproduction
https://jsfiddle.net/roc93bnt/
Steps to reproduce the bug
(true)
appears indicating that the link is active.Navigate to Foo with ID 2
button and notice that the foo link displays(false)
indicating that the link is not active.I would expect the foo link to be active when navigating to the foo path with the ID prop as a path variable.
Expected behavior
router-link's should be active and have active class applied when navigating programmatically using props.
Actual behavior
router-link's are not being set as active and do not have active class applied when navigating programmatically using props.
Additional information
No response