Skip to content

API DocumentationDocs


API Documentation / onBeforeRouteLeave

Function: onBeforeRouteLeave()

onBeforeRouteLeave(leaveGuard): void

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

Parameters

leaveGuard: NavigationGuard

NavigationGuard

Returns

void

Released under the MIT License.