Router

Namespace: Bolero

Functions for building Routers that bind page navigation with Elmish.

Functions and values

Function or valueDescription
definePageModel pageModel value
Signature: pageModel:PageModel<'T> -> value:'T -> unit
Type parameters: 'T
infer makeMessage getEndPoint
Signature: makeMessage:('ep -> 'msg) -> getEndPoint:('model -> 'ep) -> Router<'ep,'model,'msg>
Type parameters: 'ep, 'model, 'msg

Infer a router constructed around an endpoint type 'ep. This type must be an F# union type, and its cases should use EndPointAttribute to declare how they match to a URI.

inferWithModel(...)
Signature: makeMessage:('ep -> 'msg) -> getEndPoint:('model -> 'ep) -> defaultPageModel:('ep -> unit) -> Router<'ep,'model,'msg>
Type parameters: 'ep, 'model, 'msg

Infer a router constructed around an endpoint type 'ep. This type must be an F# union type, and its cases should use EndPointAttribute to declare how they match to a URI. Inside defaultPageModel, call Router.definePageModel to indicate the page model to use when switching to a new page.

noModel
Signature: PageModel<'T>
Type parameters: 'T