(insert router path name)
Insert a new entry to the router.
Insert a new entry to the router.
Path parameters coercion protocol.
Path parameters coercion protocol.
(-repr _)
Return a representation of object in path.
Return a representation of object in path.
(-navigate _ loc params query)
(-replace _ loc params query)
(match router path)
Try to match a path to a specific route in the router, returns nil
if the no match is found.
Try to match a path to a specific route in the router, returns `nil` if the no match is found.
(navigate! router id)
(navigate! router id params)
(navigate! router id params query)
Trigger a navigate event to a specific location.
Trigger a navigate event to a specific location.
(replace! router id)
(replace! router id params)
(replace! router id params query)
Trigger a replace event to a specific location.
Trigger a replace event to a specific location.
(resolve router name)
(resolve router name params)
(resolve router name params query)
Perform a url resolve operation.
Perform a url resolve operation.
(router routes)
A helper for compile a vector of routes in a router instance.
A helper for compile a vector of routes in a router instance.
(router? v)
Check if the v
is a Router instance.
Check if the `v` is a Router instance.
(start!
router
{:keys [on-navigate default html5? html5history] :or {html5? false} :as opts})
Starts the bide routing handling using the goog.history.Html5History
API as
browser history event watching mechanism.
Accepts router and configuration map. Required configuration keys are
:on-navigate
and :default
. :on-navigate
is a function that would be
called each time route is changed providing route id, params and query as
arguments. :default
used as default route id when URL doesn't match any
route registered in router. Optional configuration keys are :html5?
(false
by default) and :html5history
(new goog.history.Html5History
instance by
default). Passing anything that evaluates to logical false as value of
:html5?
would configure history to use fragment to store token. Pass factory
function that returns instance of goog.history.Html5History
to
:html5history
when you need to do some customizations to history instance
used to manage history events.
Starts the bide routing handling using the `goog.history.Html5History` API as browser history event watching mechanism. Accepts router and configuration map. Required configuration keys are `:on-navigate` and `:default`. `:on-navigate` is a function that would be called each time route is changed providing route id, params and query as arguments. `:default` used as default route id when URL doesn't match any route registered in router. Optional configuration keys are `:html5?` (`false` by default) and `:html5history` (new `goog.history.Html5History` instance by default). Passing anything that evaluates to logical false as value of `:html5?` would configure history to use fragment to store token. Pass factory function that returns instance of `goog.history.Html5History` to `:html5history` when you need to do some customizations to history instance used to manage history events.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close