From 546fada083783d46d216187ffd8c8d10e198e582 Mon Sep 17 00:00:00 2001 From: Mitar Date: Sat, 8 Jul 2017 15:24:55 -0700 Subject: [PATCH] Also hint that you can use named routes in guards. --- docs/en/advanced/navigation-guards.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/advanced/navigation-guards.md b/docs/en/advanced/navigation-guards.md index 8ff4cc730..b5a622bb8 100644 --- a/docs/en/advanced/navigation-guards.md +++ b/docs/en/advanced/navigation-guards.md @@ -30,7 +30,7 @@ Every guard function receives three arguments: - **`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. - - **`next('/')` or `next({ path: '/' })`**: redirect to a different location. The current navigation will be aborted and a new one will be started. + - **`next('/')` or `next({ path: '/' })` or `next({ name: 'home' })`**: redirect to a different location. The current navigation will be aborted and a new one will be started. - **`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()`.