Liking cljdoc? Tell your friends :D

com.fulcrologic.rad.routing.html5-history

An implementation of RAD's RouteHistory protocol, wrapping a browser's location and History API. This implementation will put an string-valued route parameters onto the query parameter section of the URI when a route is pushed or replaced, and will merge the current URL's query parameters with returned route params.

An implementation of RAD's RouteHistory protocol, wrapping a browser's location and History API. This implementation
will put an string-valued route parameters onto the query parameter section of the URI when a route is pushed or replaced,
and will merge the current URL's query parameters with returned route params.
raw docstring

apply-route!clj/s

(apply-route! app {:keys [route params] :as saved-route})

Apply the given route and params to the URL and routing system. saved-route is in the format of the return value of url->route. Returns true if it is able to route there.

Apply the given route and params to the URL and routing system. `saved-route` is in the format of
the return value of `url->route`. Returns true if it is able to route there.
sourceraw docstring

decode-uri-componentclj/s

(decode-uri-component v)

Decode the given string as a transit and URI encoded CLJ(s) value.

Decode the given string as a transit and URI encoded CLJ(s) value.
sourceraw docstring

encode-uri-componentclj/s

(encode-uri-component v)

Encode a key/value pair of CLJ(s) data such that it can be safely placed in browser query params. If v is a plain string, then it will not be transit-encoded.

Encode a key/value pair of CLJ(s) data such that it can be safely placed in browser query params. If `v` is
a plain string, then it will not be transit-encoded.
sourceraw docstring

html5-historyclj/s

(html5-history)

Create a new instance of a RouteHistory object that is properly configured against the browser's HTML5 History API.

Create a new instance of a RouteHistory object that is properly configured against the browser's HTML5 History API.
sourceraw docstring

HTML5Historyclj/s

source

query-paramsclj/s

(query-params raw-search-string)
source

query-stringclj/s

(query-string param-map & {:as string-key-values})

Convert a map to an encoded string that is acceptable on a URL. The param-map allows any data type acceptable to transit. The additional key-values must all be strings (and will be coerced to string if not).

Convert a map to an encoded string that is acceptable on a URL.
The param-map allows any data type acceptable to transit. The additional key-values must all be strings
(and will be coerced to string if not). 
sourceraw docstring

restore-route!clj/s

(restore-route! app default-page default-params)

Attempt to restore the route given in the URL. If that fails, simply route to the default given (a class and map).

WARNING: This should not be called until the HTML5 history is installed in your app.

Attempt to restore the route given in the URL. If that fails, simply route to the default given (a class and map).

WARNING: This should not be called until the HTML5 history is installed in your app.
sourceraw docstring

url->routeclj/s

(url->route)

Convert the current browser URL into a route path and parameter map. Returns:

{:route ["path" "segment"]
 :params {:param value}}

You can save this value and later use it with apply-route!.

Convert the current browser URL into a route path and parameter map. Returns:

```
{:route ["path" "segment"]
 :params {:param value}}
```

You can save this value and later use it with `apply-route!`.
sourceraw docstring

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

× close