Currently, I am working with vue-router 3.0.1
, using the mode as hash
.
The current URL displays as:
/#/?type=1
I attempted to modify the path while keeping the same base URL but with a different query parameter using window.location.href
like so.
window.location.href = '/#/?type=2';
However, despite the change in the browser's URL, there seems to be no other visible effect.
My initial motivation for trying this approach was that when using router.push
, it failed to trigger a re-render of the component.
It appears that the original behavior of window.location.href
is being altered by vue-router
.
In light of this, what steps can I take to successfully navigate to /#/?type=2
in this scenario?