update docs, add descriptions for api methods
This commit is contained in:
parent
d56c30cc4a
commit
cdb9017a72
25 changed files with 613 additions and 40 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# route(root, defaultRoute, routes)
|
||||
|
||||
- [Description](#description)
|
||||
- [Signature](#signature)
|
||||
- [Static members](#static-members)
|
||||
- [route.set](#routeset)
|
||||
|
|
@ -21,6 +22,24 @@
|
|||
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
Navigate between "pages" within an application
|
||||
|
||||
```javascript
|
||||
var Home = {
|
||||
view: function() {
|
||||
return "Welcome"
|
||||
}
|
||||
}
|
||||
|
||||
m.route(document.body, "/home", {
|
||||
"/home": Home, // defines `http://localhost/#!/home`
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Signature
|
||||
|
||||
`m.route(root, defaultRoute, routes)`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue