From 71827c3ba8d6c85a44beeb98061e6abe111645c4 Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Fri, 25 Oct 2019 12:03:21 +0200 Subject: [PATCH] [DOC] explain router history and hash mode --- doc/router.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/router.md b/doc/router.md index ace4fdbf..496b8e84 100644 --- a/doc/router.md +++ b/doc/router.md @@ -97,6 +97,13 @@ The `Router` constructor takes three arguments: - an optional object (with the only key `mode` which can be `history` (default value) or `hash`). +`history` will use the browser [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) as the mechanism to manage URL.\ +Example: `https://yourdomain.tld/my_custom_route`.\ +For this mechanism to work, you need a way to configure your web server accordingly. + +`hash` will manipulate the hash of the URL.\ +Example: `https://yourdomain.tld/index.html#/my_custom_route`. + ```js const ROUTES = [...]; const router = new owl.router.Router(env, ROUTES, {mode: 'history'});