Skip to content

Commit a5ecfa1

Browse files
committed
docs(navigation-guards): next accepts a Location
Closes #1518, #1579
1 parent 8a28426 commit a5ecfa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Every guard function receives three arguments:
3030

3131
- **`next(false)`**: abort the current navigation. If the browser URL was changed (either manually by the user or via back button), it will be reset to that of the `from` route.
3232

33-
- **`next('/')` or `next({ path: '/' })`**: redirect to a different location. The current navigation will be aborted and a new one will be started.
33+
- **`next('/')` or `next({ path: '/' })`**: redirect to a different location. The current navigation will be aborted and a new one will be started. You can pass any location object to `next`, which allows you to specify options like `replace: true`, `name: 'home'` and any option used in [`router-link`'s `to` prop](../api/router-link.md) or [`router.push`](../api/router-instance.md#methods)
3434

3535
- **`next(error)`**: (2.4.0+) if the argument passed to `next` is an instance of `Error`, the navigation will be aborted and the error will be passed to callbacks registered via `router.onError()`.
3636

0 commit comments

Comments
 (0)