Merge branch 'next' into components

This commit is contained in:
Leo Horie 2015-03-26 21:53:03 -04:00
commit f7c9558295
2 changed files with 35 additions and 1 deletions

View file

@ -40,6 +40,8 @@
<li><a href="mithril.route.html#mode-abstraction" title="Routing mode abstraction">m.route(element)</a></li>
<li><a href="mithril.route.html#mode" title="Whether routing uses location hash, querystring or pathname">m.route.mode</a></li>
<li><a href="mithril.route.html#param" title="Read an argument from a parameterized route">m.route.param</a></li>
<li><a href="mithril.route.html#buildQueryString" title="Serialize data into querystring format">m.route.buildQueryString</a></li>
<li><a href="mithril.route.html#parseQueryString" title="Read an argument from a parameterized route">m.route.parseQueryString</a></li>
</ul>
</li>
</ul>

View file

@ -169,7 +169,7 @@ This mechanism is useful to clear timers and unsubscribe event handlers. If you
[How to read signatures](how-to-read-signatures.md)
```clike
void route(DOMElement rootElement, String defaultRoute, Object<Module> routes) { String mode, String param(String key) }
void route(DOMElement rootElement, String defaultRoute, Object<Module> routes) { String mode, String param(String key), String buildQueryString(Object data), Object parseQueryString(String data) }
where:
Module :: Object { void controller(), void view(Object controllerInstance) }
@ -253,6 +253,38 @@ where:
The value that maps to the parameter specified by `key`
- <a name="buildQueryString"></a>
#### m.route.buildQueryString
**String buildQueryString(Object data)**
Serializes an object into its URI encoded querystring representation, following the same serialization conventions as [URI.js](http://http://medialize.github.io/URI.js/)
- **Object data**
An object to be serialized
- **returns String querystring**
The serialized representation of the input data
- <a name="parseQueryString"></a>
#### m.route.parseQueryString
**Object parseQueryString(String data)**
Deserializes an object into from a URI encoded querystring representation, following the same deserialization conventions as [URI.js](http://http://medialize.github.io/URI.js/)
- **Object data**
An object to be deserialized
- **returns String querystring**
The deserialized representation of the input data
---
<a name="redirecting"></a>