Liking cljdoc? Tell your friends :D

bangmod.router.core


atom-matched-routecljs

source

atom-paramscljs

source

atom-query-paramscljs

source

match-pathcljs

(match-path path)

The route the registered table gives path (a path with an optional query string, as the browser's location would hold it): {:handler kw :route-params {kw string} :query-params {kw string}}, or nil when no route matches. Both param maps are {} when there are none. Reads only the tables register-routes installed; needs no browser, no start!, and changes no state.

It is the match navigation makes (the same code pushy calls), so when two registered tables match one path, the table registered first wins here as it does on screen.

(match-path "/projects/42?tab=logs") ;; => {:handler :project-detail :route-params {:id "42"} :query-params {:tab "logs"}} (match-path "/nowhere") ;; => nil

The route the registered table gives `path` (a path with an optional query string, as the
browser's location would hold it): `{:handler kw :route-params {kw string} :query-params
{kw string}}`, or nil when no route matches. Both param maps are `{}` when there are none.
Reads only the tables `register-routes` installed; needs no browser, no `start!`, and
changes no state.

It is the match navigation makes (the same code pushy calls), so when two registered
tables match one path, the table registered first wins here as it does on screen.

  (match-path "/projects/42?tab=logs")
  ;; => {:handler :project-detail :route-params {:id "42"} :query-params {:tab "logs"}}
  (match-path "/nowhere")
  ;; => nil
sourceraw docstring

(navigate! handler)
source

register-routescljs

(register-routes routes)
source

registration-reportcljs

(registration-report)

{:routed [...] :registered [...] :duplicates [...] :orphan-routes [...] :orphan-registrations [...]}

routed are the handlers the route table can match; registered are the ones with a routed-component implementation. A duplicate silently shadows a component; an orphan is an ABSENCE — a route that renders blank, or a component nothing reaches — which the registration-time collision check cannot see.

{:routed [...] :registered [...] :duplicates [...] :orphan-routes [...] :orphan-registrations [...]}

`routed` are the handlers the route table can match; `registered` are the ones with
a `routed-component` implementation. A duplicate silently shadows a component; an
orphan is an ABSENCE — a route that renders blank, or a component nothing reaches —
which the registration-time collision check cannot see.
sourceraw docstring

start!cljs

(start! options)
source

url-forcljs

(url-for & args)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close