mirror of
https://github.com/metosin/reitit.git
synced 2025-12-24 19:08:24 +00:00
Clean frontend routing docstrings
This commit is contained in:
parent
9729a7424e
commit
b99e25ef4f
2 changed files with 8 additions and 5 deletions
|
|
@ -15,15 +15,15 @@
|
|||
remove listeners using stop! call before calling start! again.
|
||||
|
||||
Parameters:
|
||||
- router The Reitit routing tree.
|
||||
- on-navigate Function to be called when route changes. Takes two parameters, ´token´ and ´history´ object.
|
||||
- router The Reitit router.
|
||||
- on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.
|
||||
|
||||
Options:
|
||||
- :use-fragment (default true) If true, onhashchange and location hash are used to store the token."
|
||||
[routes on-navigate opts]
|
||||
[router on-navigate opts]
|
||||
(swap! history (fn [old-history]
|
||||
(rfh/stop! old-history)
|
||||
(rfh/start! routes on-navigate opts))))
|
||||
(rfh/start! router on-navigate opts))))
|
||||
|
||||
(defn href
|
||||
([k]
|
||||
|
|
|
|||
|
|
@ -102,11 +102,14 @@
|
|||
|
||||
(defn start!
|
||||
"This registers event listeners on HTML5 history and hashchange events.
|
||||
|
||||
Returns History object.
|
||||
|
||||
When using with development workflow like Figwheel, rememeber to
|
||||
remove listeners using stop! call before calling start! again.
|
||||
|
||||
Parameters:
|
||||
- router The Reitit routing tree.
|
||||
- router The Reitit router.
|
||||
- on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.
|
||||
|
||||
Options:
|
||||
|
|
|
|||
Loading…
Reference in a new issue