From 5608b5ce4c24bf71b34ac13ed747beebfb4a4730 Mon Sep 17 00:00:00 2001 From: franknova Date: Fri, 12 Sep 2014 13:24:17 +0800 Subject: [PATCH] Update mithril.route.md Set the `m.route.mode="hash"` first, then define the `m.route` --- docs/mithril.route.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/mithril.route.md b/docs/mithril.route.md index 5888be53..7c5c39ba 100644 --- a/docs/mithril.route.md +++ b/docs/mithril.route.md @@ -51,13 +51,13 @@ var dashboard = { } } +//setup routes to start w/ the `#` symbol +m.route.mode = "hash"; + //define a route m.route(document.body, "/dashboard/johndoe", { "/dashboard/:userID": dashboard }); - -//setup routes to start w/ the `#` symbol -m.route.mode = "hash"; ``` This redirects to the URL `http://server/#/dashboard/johndoe` and yields: