Skip to content

Commit

Permalink
docs: note about mixins navigation guards
Browse files Browse the repository at this point in the history
Close #3143
  • Loading branch information
posva committed Aug 8, 2020
1 parent 2396cba commit da28363
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/guide/advanced/navigation-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ beforeRouteLeave (to, from, next) {
}
```

If you are using mixins that add in-component navigation guards, make sure to add the mixin **after installing the router plugin**:

```js
Vue.use(Router)

Vue.mixin({
beforeRouteUpdate(to, from ,next) {
// ...
}
})
```

## The Full Navigation Resolution Flow

1. Navigation triggered.
Expand Down

0 comments on commit da28363

Please sign in to comment.