From 1fd9cf4271e54ffea45a1182bef762af688d86c9 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 3 Aug 2016 17:36:08 -0400 Subject: [PATCH] make note about default prefix in router #1176 --- docs/v1.x-migration.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/v1.x-migration.md b/docs/v1.x-migration.md index 83d70f07..20cfbeb6 100644 --- a/docs/v1.x-migration.md +++ b/docs/v1.x-migration.md @@ -7,6 +7,7 @@ - [Component `controller` function](#component-controller-function) - [Component arguments](#component-arguments) - [Passing components to `m()`](#passing-components-to-m) +- [`m.route` mode](#mroute-mode) - [`m.route` and anchor tags](#mroute-and-anchor-tags) - [Reading/writing the current route](#readingwriting-the-current-route) - [Accessing route params](#accessing-route-params) @@ -177,6 +178,10 @@ m("div", component); m("div", m(component)); ``` +## `m.route` mode + +`m.route.mode` was replaced by `m.route.prefix(prefix)` where `prefix` can be `#`, `?`, `` (for "pathname" mode). The new API also supports hashbang (`#!`), which is the default, and it supports non-root pathnames and arbitrary mode variations such as querybang (`?!`) + ## `m.route()` and anchor tags Handling clicks on anchor tags via the mithril router is similar to `v0.2.x` but uses a new lifecycle method and API.