mirror of
https://github.com/metosin/reitit.git
synced 2026-01-28 09:00:33 +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.
|
remove listeners using stop! call before calling start! again.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- router The Reitit routing tree.
|
- router The Reitit router.
|
||||||
- on-navigate Function to be called when route changes. Takes two parameters, ´token´ and ´history´ object.
|
- on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
- :use-fragment (default true) If true, onhashchange and location hash are used to store the token."
|
- :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]
|
(swap! history (fn [old-history]
|
||||||
(rfh/stop! old-history)
|
(rfh/stop! old-history)
|
||||||
(rfh/start! routes on-navigate opts))))
|
(rfh/start! router on-navigate opts))))
|
||||||
|
|
||||||
(defn href
|
(defn href
|
||||||
([k]
|
([k]
|
||||||
|
|
|
||||||
|
|
@ -102,11 +102,14 @@
|
||||||
|
|
||||||
(defn start!
|
(defn start!
|
||||||
"This registers event listeners on HTML5 history and hashchange events.
|
"This registers event listeners on HTML5 history and hashchange events.
|
||||||
|
|
||||||
|
Returns History object.
|
||||||
|
|
||||||
When using with development workflow like Figwheel, rememeber to
|
When using with development workflow like Figwheel, rememeber to
|
||||||
remove listeners using stop! call before calling start! again.
|
remove listeners using stop! call before calling start! again.
|
||||||
|
|
||||||
Parameters:
|
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.
|
- on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue