Skip to content

vue-router / onBeforeRouteUpdate

onBeforeRouteUpdate()

ts
function onBeforeRouteUpdate(updateGuard): void;

Add a navigation guard that triggers whenever the current location is about to be updated. Similar to beforeRouteUpdate but can be used in any component. The guard is removed when the component is unmounted.

Parameters

updateGuard

NavigationGuard

NavigationGuard

Returns

void

Released under the MIT License.