document new argument in m.route(path)

This commit is contained in:
Leo Horie 2014-05-25 23:52:46 -04:00
parent 2b8c82e365
commit bdcfbde8e0
5 changed files with 19 additions and 12 deletions

View file

@ -5,6 +5,8 @@
### News:
- The signature of `m` now accepts virtual elements as the second parameter of the function.
- `m.route(path, params)` now accepts an argument that gets parsed as a querystring.
- routes now ignore trailing slashes [#88](https://github.com/lhorie/mithril.js/issues/88)
### Bug Fixes:

View file

@ -37,7 +37,7 @@
<li><a href="mithril.route.html">m.route</a>
<ul>
<li><a href="mithril.route.html#defining-routes">m.route(rootElement, defaultRoute, routes)</a></li>
<li><a href="mithril.route.html#redirecting">m.route(path)</a></li>
<li><a href="mithril.route.html#redirecting">m.route(path, params)</a></li>
<li><a href="mithril.route.html#reading-current-route">m.route()</a></li>
<li><a href="mithril.route.html#mode-abstraction">m.route(element)</a></li>
<li><a href="mithril.route.html#mode">m.route.mode</a></li>

View file

@ -264,13 +264,17 @@ redirects to `http://server/#/dashboard/marysue`
[How to read signatures](how-to-read-signatures.md)
```clike
void route(String path)
void route(String path [, any params])
```
- **String path**
The route to redirect to. Note that to redirect to a different page outside of the scope of Mithril's routing, you should use `window.location`
- **any params**
Parameters to pass as a querystring
---
<a name="reading-current-route"></a>