Skip to content

Commit da28363

Browse files
committed
docs: note about mixins navigation guards
Close #3143
1 parent 2396cba commit da28363

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: docs/guide/advanced/navigation-guards.md

+12
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ beforeRouteLeave (to, from, next) {
156156
}
157157
```
158158

159+
If you are using mixins that add in-component navigation guards, make sure to add the mixin **after installing the router plugin**:
160+
161+
```js
162+
Vue.use(Router)
163+
164+
Vue.mixin({
165+
beforeRouteUpdate(to, from ,next) {
166+
// ...
167+
}
168+
})
169+
```
170+
159171
## The Full Navigation Resolution Flow
160172

161173
1. Navigation triggered.

0 commit comments

Comments
 (0)