Closed
Description
What problem does this feature solve?
when router has redirect I got this error: Redirected when going from "/a" to "/b" via a navigation guard.
I found this line of code(199-200):
vue-router/src/history/base.js
Lines 194 to 209 in b0ef497
Redirection is a commonly used function, I think that this error should not be thrown frequently or provide a function to choose whether to throw an error.
By the way, why should this exception be thrown, and what is its purpose?
I use Google Translate, which may cause difficulty in understanding...
What does the proposed API look like?
// like this
interface NavigationGuardOptions {
throwError: boolean
}
export type NavigationGuardNext<V extends Vue = Vue> = (
to?: RawLocation | false | ((vm: V) => any) | void,
options: NavigationGuardOptions
) => void
Metadata
Metadata
Assignees
Labels
No labels