From 3dd9271c09cc7c151f73a16f97d81b1475c3a092 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 10 Nov 2022 15:07:47 +0100 Subject: [PATCH] docs: add initial documentation for router composables (#8895) --- .../3.api/1.composables/on-before-route-leave.md | 11 +++++++++++ .../3.api/1.composables/on-before-route-update.md | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docs/content/3.api/1.composables/on-before-route-leave.md create mode 100644 docs/content/3.api/1.composables/on-before-route-update.md 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"} +::