Skip to content

Commit 2717893

Browse files
authored
fix #680
1 parent 5f1d403 commit 2717893

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/en/advanced/navigation-guards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Finally, you can directly define route navigation guards inside route components
6161
``` js
6262
const Foo = {
6363
template: `...`,
64-
beforeRouteEnter (route, redirect, next) => {
64+
beforeRouteEnter (route, redirect, next) {
6565
// called before the route that renders this component is confirmed.
6666
// does NOT have access to `this` component instance,
6767
// because it has not been created yet when this guard is called!
6868
},
69-
beforeRouteLeave (route, redirect, next) => {
69+
beforeRouteLeave (route, redirect, next) {
7070
// called when the route that renders this component is about to
7171
// be navigated away from.
7272
// has access to `this` component instance.
@@ -79,7 +79,7 @@ The `beforeRouteEnter` guard does **NOT** have access to `this`, because the gua
7979
However, you can access the instance by passing a callback to `next`. The callback will be called when the navigation is confirmed, and the component instance will be passed to the callback as the argument:
8080

8181
``` js
82-
beforeRouteEnter (route, redirect, next) => {
82+
beforeRouteEnter (route, redirect, next) {
8383
next(vm => {
8484
// access to component instance via `vm`
8585
})

0 commit comments

Comments
 (0)