Skip to content

Commit 8f10178

Browse files
Christof Leuenbergerposva
Christof Leuenberger
authored andcommitted
Update redirect-and-alias.md (#1588)
* Update redirect-and-alias.md Added note about navigation guards not being applied on redirects. Background: I just tried doing a conditional redirect where I rely on user data being loaded into the vuex store by the route guards. But since they are only applied after the redirect (on the actual route that you are being redirected to), the data was never there. * Update redirect-and-alias.md
1 parent a5ecfa1 commit 8f10178

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: docs/en/essentials/redirect-and-alias.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const router = new VueRouter({
3535
})
3636
```
3737

38-
For other advanced usage, check out the [example](https://github.com/vuejs/vue-router/blob/dev/examples/redirect/app.js).
38+
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.
39+
40+
For other advanced usage, checkout the [example](https://github.com/vuejs/vue-router/blob/dev/examples/redirect/app.js).
3941

4042
### Alias
4143

0 commit comments

Comments
 (0)