From d591289040eeed9363bc9f002a7ace3687a53956 Mon Sep 17 00:00:00 2001 From: ronald-d-rogers Date: Sat, 17 Jun 2017 13:04:14 -0400 Subject: [PATCH] Added documentation for replace in next function --- docs/en/advanced/navigation-guards.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/advanced/navigation-guards.md b/docs/en/advanced/navigation-guards.md index 8ff4cc730..c75d3e953 100644 --- a/docs/en/advanced/navigation-guards.md +++ b/docs/en/advanced/navigation-guards.md @@ -32,6 +32,8 @@ Every guard function receives three arguments: - **`next('/')` or `next({ path: '/' })`**: redirect to a different location. The current navigation will be aborted and a new one will be started. + - **`next({ path: '/404', replace: true })`**: redirect to a different location. The current navigation will be aborted and replaced with the new one. + - **`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()`. **Make sure to always call the `next` function, otherwise the hook will never be resolved.**