i try to delete a query parameter with a button click.
For example my route is http://localhost:8080/#/myroute?dialog=1
.
Now i click a button that should delete the query part ?dialog=1
.
My click function look like this:
delete_query() {
this.$router.replace({ query: null });
}
i have also try this attempts:
delete_query() {
this.$router.push({ query: null });
}
delete_query() {
this.$router.push({ name: this.$route.name });
}
But all of these functions give me the same error:
Uncaught (in promise) Error: Redirected when going from "/myroute?dialog=1" to "/myroute" via a navigation guard.
Why? What i do wrong? How can i solve this?
I have the actual version 3.5.1 of vue router installed.