Skip to content

Update Japanese docs #1813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Oct 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/ja/advanced/navigation-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ beforeRouteEnter (to, from, next) {
}
```

Note that `beforeRouteEnter` is the only hook that supports passing a callback to `next`. For `beforeRouteUpdate` and `beforeRouteLeave`, `this` is already available, so passing a callback is unnecessary and therefore *not supported*:
`beforeRouteEnter` はコールバックを `next` に渡すことをサポートするだけのフックであるということに注意してください。`beforeRouteUpdate` `beforeRouteLeave` の場合、 `this` は既に利用可能です。したがって、コールバックを渡す必要はないので、*サポートされません*:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コールバックを next に渡すことをサポートするだけのフック

原文はコールバックを渡すことをサポートするのは beforeRouteEnter だけであることを言ってると思うので、すこし意味が変わってしまっているように見えます。


```js
beforeRouteUpdate (to, from, next) {
// just use `this`
// `this` を使用
this.name = to.params.name
next()
}
```

The **leave guard** is usually used to prevent the user from accidentally leaving the route with unsaved edits. The navigation can be canceled by calling `next(false)`.
**leave ガード**は、通常、ユーザが保存されていない編集内容で誤って経路を離れるのを防ぐために使用されます。ナビゲーションは `next(false)` を呼び出すことで取り消すことができます。

```js
beforeRouteLeave (to, from , next) {
Expand Down