tweaks to docs
This commit is contained in:
parent
f1f52445ec
commit
ae916664de
3 changed files with 3 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ m.request({
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Calls to `m.request` return a [promise](promise.md).
|
A call to `m.request` return a [promise](promise.md) and trigger a redraw upon completion of its promise chain.
|
||||||
|
|
||||||
By default, `m.request` assumes the response is in JSON format and parses it into a Javascript object (or array).
|
By default, `m.request` assumes the response is in JSON format and parses it into a Javascript object (or array).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ Argument | Type | Description
|
||||||
|
|
||||||
If `onmatch` returns a component or a promise that resolves to a component, this component is used as the `vnode.tag` for the first argument in the RouteResolver's `render` method. Otherwise, `vnode.tag` is set to `"div"`. Similarly, if the `onmatch` method is omitted, `vnode.tag` is also `"div"`.
|
If `onmatch` returns a component or a promise that resolves to a component, this component is used as the `vnode.tag` for the first argument in the RouteResolver's `render` method. Otherwise, `vnode.tag` is set to `"div"`. Similarly, if the `onmatch` method is omitted, `vnode.tag` is also `"div"`.
|
||||||
|
|
||||||
If `onmatch` returns a promise that gets rejected, the router redirects back to `defaultRoute`.
|
If `onmatch` returns a promise that gets rejected, the router redirects back to `defaultRoute`. You may override this behavior by calling `.catch` on the promise chain before returning it.
|
||||||
|
|
||||||
##### routeResolver.render
|
##### routeResolver.render
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Returns an event handler that runs `callback` with the value of the specified DO
|
||||||
```javascript
|
```javascript
|
||||||
var state = {
|
var state = {
|
||||||
value: "",
|
value: "",
|
||||||
setValue: function(v) {value = v}
|
setValue: function(v) {state.value = v}
|
||||||
}
|
}
|
||||||
|
|
||||||
var Component = {
|
var Component = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue