You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Vue: Incorrect href [object Object] when using router-link object #30848
I’ve reviewed the report and reproduced the [object Object] behavior when passing a Vue Router location object (e.g. { name: "details" }) into router-link on components like ion-button and ion-item. Navigation works correctly, but the rendered DOM does not reflect the resolved URL in either the routerlink attribute or the internal anchor href.
My plan is to:
Inspect how routerLink values are handled inside the Ionic Vue wrapper
Resolve router location objects into actual href strings (e.g. using router.resolve())
Ensure both the host attribute and internal anchor reflect the correct path
Test with named routes, params, and string paths to confirm consistent output
Open a PR once the correct DOM output is verified
Before I begin, I have one quick question:
– Should the resolution logic be applied at the wrapper level for Vue components, or should the internal anchor generator handle object → string conversion?
If this direction looks good, please assign this issue to me. Thanks! 🚀
Verified on 9.0.8. When router-link is given a route location object, @ionic/vue uses the object for navigation, which is why clicking works. It also copies the same object straight into the inner anchor's href without asking Vue Router to resolve it, so the anchor ends up with the text [object Object]. Besides the hover URL, this means ctrl/cmd-clicking to open the link in a new tab loads /[object Object].
Workaround, verified on 9.0.8 with createWebHistory(): resolve the location yourself and pass the resulting string.
Activity
Mudavath-kumar commentedon Dec 22, 2025
Hi! I’d like to work on this issue.
I’ve reviewed the report and reproduced the [object Object] behavior when passing a Vue Router location object (e.g. { name: "details" }) into router-link on components like ion-button and ion-item. Navigation works correctly, but the rendered DOM does not reflect the resolved URL in either the routerlink attribute or the internal anchor href.
My plan is to:
Inspect how routerLink values are handled inside the Ionic Vue wrapper
Resolve router location objects into actual href strings (e.g. using router.resolve())
Ensure both the host attribute and internal anchor reflect the correct path
Test with named routes, params, and string paths to confirm consistent output
Open a PR once the correct DOM output is verified
Before I begin, I have one quick question:
– Should the resolution logic be applied at the wrapper level for Vue components, or should the internal anchor generator handle object → string conversion?
If this direction looks good, please assign this issue to me. Thanks! 🚀
thetaPC commentedon Oct 19, 2026
Thanks for the report, and sorry for the delay.
Verified on 9.0.8. When
router-linkis given a route location object,@ionic/vueuses the object for navigation, which is why clicking works. It also copies the same object straight into the inner anchor'shrefwithout asking Vue Router to resolve it, so the anchor ends up with the text[object Object]. Besides the hover URL, this means ctrl/cmd-clicking to open the link in a new tab loads/[object Object].Workaround, verified on 9.0.8 with
createWebHistory(): resolve the location yourself and pass the resulting string.Tracked as a bug in
stenciljs/output-targets.ShaneK commentedon Oct 28, 2026
Thanks for your report! This has been fixed in v9.0.10!
fix(vue): render resolved href for object router-link (ionic-team#31663)