Skip to content

vue-router / NavigationGuardNext

NavigationGuardNext() ​

Callback passed to navigation guards to continue or abort the navigation.

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Call Signature ​

ts
NavigationGuardNext(): void;

Callback passed to navigation guards to continue or abort the navigation.

Returns ​

void

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Call Signature ​

ts
NavigationGuardNext(error): void;

Callback passed to navigation guards to continue or abort the navigation.

Parameters ​

error ​

Error

Returns ​

void

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Call Signature ​

ts
NavigationGuardNext(location): void;

Callback passed to navigation guards to continue or abort the navigation.

Parameters ​

location ​

| string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric

Returns ​

void

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Call Signature ​

ts
NavigationGuardNext(valid): void;

Callback passed to navigation guards to continue or abort the navigation.

Parameters ​

valid ​

boolean | undefined

Returns ​

void

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Call Signature ​

ts
NavigationGuardNext(cb): void;

Callback passed to navigation guards to continue or abort the navigation.

Parameters ​

cb ​

NavigationGuardNextCallback

Returns ​

void

Deprecated ​

Prefer returning a value from the guard instead of calling next(value). The callback will be removed in a future version of Vue Router.

Released under the MIT License.