From fd6f67ee63f44b969bcc6d62e2c729aa1a56d6c6 Mon Sep 17 00:00:00 2001 From: Matteo Fogli Date: Fri, 2 Feb 2018 15:53:12 +0100 Subject: [PATCH 1/4] Expose redirectedFrom property in $route object --- docs/en/api/route-object.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/api/route-object.md b/docs/en/api/route-object.md index 70abb4f2c..b08965b3a 100644 --- a/docs/en/api/route-object.md +++ b/docs/en/api/route-object.md @@ -87,3 +87,7 @@ The route object can be found in multiple places: - **$route.name** The name of the current route, if it has one. (See [Named Routes](../essentials/named-routes.md)) + +- **$route.redirectedFrom** + + The name of the route being redirected from, if it there were one. (See [Redirect and Alias](../essentials/redirect-and-alias.md)) From ba6b939f4dd39eb3434b9f8e89d6d9b620ee92c6 Mon Sep 17 00:00:00 2001 From: Matteo Fogli Date: Fri, 2 Feb 2018 15:57:04 +0100 Subject: [PATCH 2/4] fix typo --- docs/en/api/route-object.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api/route-object.md b/docs/en/api/route-object.md index b08965b3a..5835737e0 100644 --- a/docs/en/api/route-object.md +++ b/docs/en/api/route-object.md @@ -90,4 +90,4 @@ The route object can be found in multiple places: - **$route.redirectedFrom** - The name of the route being redirected from, if it there were one. (See [Redirect and Alias](../essentials/redirect-and-alias.md)) + The name of the route being redirected from, if there were one. (See [Redirect and Alias](../essentials/redirect-and-alias.md)) From ae32ced67f9630a73b8636c497b1cbf86cbb8e31 Mon Sep 17 00:00:00 2001 From: Matteo Fogli Date: Fri, 2 Feb 2018 16:03:09 +0100 Subject: [PATCH 3/4] Add note on props and meta fields on redirects --- docs/en/essentials/redirect-and-alias.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/essentials/redirect-and-alias.md b/docs/en/essentials/redirect-and-alias.md index 859549bb6..27eee89ad 100644 --- a/docs/en/essentials/redirect-and-alias.md +++ b/docs/en/essentials/redirect-and-alias.md @@ -37,6 +37,8 @@ const router = new VueRouter({ Note that [Navigation Guards](../advanced/navigation-guards.md) are not applied on the route that redirects, only on its target. In the example below, adding a `beforeEnter` or `beforeLeave` guard to the `/a` route would not have any effect. +[Meta fields](../advanced/meta.md) and [props](passing-props.md) are ignored if specified on a redirect route definition + For other advanced usage, checkout the [example](https://github.com/vuejs/vue-router/blob/dev/examples/redirect/app.js). ### Alias From d67bd42675e0bdd9dc67f91de0a145c35aacf79b Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 27 Feb 2018 18:10:14 +0100 Subject: [PATCH 4/4] [skip ci] --- docs/en/essentials/redirect-and-alias.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/en/essentials/redirect-and-alias.md b/docs/en/essentials/redirect-and-alias.md index 27eee89ad..859549bb6 100644 --- a/docs/en/essentials/redirect-and-alias.md +++ b/docs/en/essentials/redirect-and-alias.md @@ -37,8 +37,6 @@ const router = new VueRouter({ Note that [Navigation Guards](../advanced/navigation-guards.md) are not applied on the route that redirects, only on its target. In the example below, adding a `beforeEnter` or `beforeLeave` guard to the `/a` route would not have any effect. -[Meta fields](../advanced/meta.md) and [props](passing-props.md) are ignored if specified on a redirect route definition - For other advanced usage, checkout the [example](https://github.com/vuejs/vue-router/blob/dev/examples/redirect/app.js). ### Alias