Router<'ep, 'model, 'msg> Type

A simple router where the endpoint corresponds to a value easily gettable from the model.

Record fields

Record Field Description

getEndPoint

Full Usage: getEndPoint

Field type: 'model -> 'ep

Extract the current endpoint from the model.

Field type: 'model -> 'ep

getRoute

Full Usage: getRoute

Field type: 'ep -> string

Get the uri corresponding to an endpoint.

Field type: 'ep -> string

makeMessage

Full Usage: makeMessage

Field type: 'ep -> 'msg

Convert an endpoint into the message that sets it.

Field type: 'ep -> 'msg

notFound

Full Usage: notFound

Field type: 'ep option

The endpoint to switch to if the user initially navigates to an unknown uri. If None, stay on the initial page.

Field type: 'ep option

setRoute

Full Usage: setRoute

Field type: string -> 'ep option

Get the message to send when the page navigates to an uri.

Field type: string -> 'ep option

Instance members

Instance member Description

this.Link

Full Usage: this.Link

Parameters:
    endpoint : 'ep
    ?hash : string

Returns: string

Get the uri for the given endpoint.

endpoint : 'ep
?hash : string
Returns: string