Skip to content

Commit 94e6b89

Browse files
posvayyx990803
authored andcommitted
Reference dynamic route matching in navigation guards (#1072)
People is often trying to react to params or queries changes with navigation guards. Adding a little reminder at the top of that page will refresh people's mind.
1 parent 730bb08 commit 94e6b89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/en/advanced/navigation-guards.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
As the name suggests, the navigation guards provided by `vue-router` are primarily used to guard navigations either by redirecting it or canceling it. There are a number of ways to hook into the route navigation process: globally, per-route, or in-component.
44

5+
Remember **Params or queries changes won't trigger navigation guards**. Simply [watch the `$route` object](../essentials/dynamic-matching.md#reacting-to-params-changes) to react to those changes.
6+
57
### Global Guards
68

79
You can register global before guards using `router.beforeEach`:

0 commit comments

Comments
 (0)