Header menu logo Navs

Route Type

Static members

Static member Description

Route.cache strategy definition

Full Usage: Route.cache strategy definition

Parameters:
Returns: RouteDefinition<'a>
Modifiers: inline
Type parameters: 'a

This function allows you to define if the route can be restored from an in memory cache or if it should be always re-rendered when activated.

strategy : CacheStrategy
definition : RouteDefinition<'a>
Returns: RouteDefinition<'a>

Route.child child definition

Full Usage: Route.child child definition

Parameters:
Returns: RouteDefinition<'a> The parent route definition with the child route definition added
Modifiers: inline
Type parameters: 'a

Takes a route definition and adds it as a child of the parent route definition.

child : RouteDefinition<'a>

The child route definition

definition : RouteDefinition<'a>

The parent route definition

Returns: RouteDefinition<'a>

The parent route definition with the child route definition added

Route.children children definition

Full Usage: Route.children children definition

Parameters:
Returns: RouteDefinition<'a> The parent route definition with the child route definition added
Modifiers: inline
Type parameters: 'a

Takes a sequence of route definitions and adds them as children of the parent route definition.

children : RouteDefinition<'a> seq

The child route definition

definition : RouteDefinition<'a>

The parent route definition

Returns: RouteDefinition<'a>

The parent route definition with the child route definition added

Route.define (name, path, handler)

Full Usage: Route.define (name, path, handler)

Parameters:
    name : string - The name of the route
    path : string - A templated URL that will be used to match this route
    handler : RouteContext -> INavigable<'View> -> Async<'View> - An async returning function to render when the route is activated.

Returns: RouteDefinition<'View> A route definition
Modifiers: inline
Type parameters: 'View

Defines a route in the application

A cancellation token can be extracted from Async.CancellationToken in the async workdflow to support cancellation of the route activation.

name : string

The name of the route

path : string

A templated URL that will be used to match this route

handler : RouteContext -> INavigable<'View> -> Async<'View>

An async returning function to render when the route is activated.

Returns: RouteDefinition<'View>

A route definition

Route.define (name, path, handler)

Full Usage: Route.define (name, path, handler)

Parameters:
    name : string - The name of the route
    path : string - A templated URL that will be used to match this route
    handler : RouteContext -> INavigable<'View> -> CancellationToken -> Task<'View> - An task returning function to render when the route is activated.

Returns: RouteDefinition<'View> A route definition
Modifiers: inline
Type parameters: 'View

Defines a route in the application

A cancellation token is provided alongside the route context to allow you to support cancellation of the route activation.

name : string

The name of the route

path : string

A templated URL that will be used to match this route

handler : RouteContext -> INavigable<'View> -> CancellationToken -> Task<'View>

An task returning function to render when the route is activated.

Returns: RouteDefinition<'View>

A route definition

Route.define (name, path, handler)

Full Usage: Route.define (name, path, handler)

Parameters:
    name : string - The name of the route
    path : string - A templated URL that will be used to match this route
    handler : RouteContext -> INavigable<'View> -> 'View - The view to render when the route is activated

Returns: RouteDefinition<'View> A route definition
Modifiers: inline
Type parameters: 'View

Defines a route in the application

name : string

The name of the route

path : string

A templated URL that will be used to match this route

handler : RouteContext -> INavigable<'View> -> 'View

The view to render when the route is activated

Returns: RouteDefinition<'View>

A route definition

Type something to start searching.