diff --git a/docs/content/3.api/1.composables/on-before-route-leave.md b/docs/content/3.api/1.composables/on-before-route-leave.md new file mode 100644 index 0000000000..ff484625bd --- /dev/null +++ b/docs/content/3.api/1.composables/on-before-route-leave.md @@ -0,0 +1,11 @@ +--- +title: "onBeforeRouteLeave" +description: The onBeforeRouteLeave composable allows registering a route guard within a component. +--- + +# `onBeforeRouteLeave` + +The `onBeforeRouteLeave` composable adds a navigation guard that triggers whenever the component for the current location is about to be left. + +::ReadMore{link="https://router.vuejs.org/api/index.html#onbeforerouteleave"} +:: diff --git a/docs/content/3.api/1.composables/on-before-route-update.md b/docs/content/3.api/1.composables/on-before-route-update.md new file mode 100644 index 0000000000..16166a5288 --- /dev/null +++ b/docs/content/3.api/1.composables/on-before-route-update.md @@ -0,0 +1,11 @@ +--- +title: "onBeforeRouteUpdate" +description: The onBeforeRouteUpdate composable allows registering a route guard within a component. +--- + +# `onBeforeRouteUpdate` + +The `onBeforeRouteUpdate` composable adds a navigation guard that triggers whenever the component for the current location is about to be updated. + +::ReadMore{link="https://router.vuejs.org/api/index.html#onbeforerouteupdate"} +::