Liking cljdoc? Tell your friends :D

bide.core


emptycljs

(empty)

Construct an empty router.

Construct an empty router.
sourceraw docstring

insertcljs

(insert router path name)

Insert a new entry to the router.

Insert a new entry to the router.
sourceraw docstring

IPathReprcljsprotocol

Path parameters coercion protocol.

Path parameters coercion protocol.

-reprcljs

(-repr _)

Return a representation of object in path.

Return a representation of object in path.
sourceraw docstring

IRoutercljsprotocol

-navigatecljs

(-navigate _ loc params query)

-replacecljs

(-replace _ loc params query)
source

matchcljs

(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.
sourceraw docstring

(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.
sourceraw docstring

replace!cljs

(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.
sourceraw docstring

resolvecljs

(resolve router name)
(resolve router name params)
(resolve router name params query)

Perform a url resolve operation.

Perform a url resolve operation.
sourceraw docstring

routercljs

(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.
sourceraw docstring

router?cljs

(router? v)

Check if the v is a Router instance.

Check if the `v` is a Router instance.
sourceraw docstring

start!cljs

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close