Logo Navs

Route Type

Constructors

Constructor Description

Route(def)

Full Usage: Route(def)

Parameters:
Returns: Route

Initializes a new instance of the Route class with a name.

def : RouteDefinition<Control>
Returns: Route

Route(name, path, handler)

Full Usage: Route(name, path, handler)

Parameters:
Returns: Route

Initializes a new instance of the Route class with a name and an asynchronous handler.

name : string
path : string
handler : RouteContext -> INavigable<Control> -> CancellationToken -> Task<Control>
Returns: Route

Route(name, path, handler)

Full Usage: Route(name, path, handler)

Parameters:
Returns: Route

Initializes a new instance of the Route class with a name and an asynchronous handler.

name : string
path : string
handler : RouteContext -> INavigable<Control> -> Async<Control>
Returns: Route

Route(name, path, handler)

Full Usage: Route(name, path, handler)

Parameters:
Returns: Route

Initializes a new instance of the Route class with a name and a handler.

name : string
path : string
handler : RouteContext -> INavigable<Control> -> Control
Returns: Route

Instance members

Instance member Description

this.Definition

Full Usage: this.Definition

Returns: RouteDefinition<Control>

Gets the definition of the route.

Returns: RouteDefinition<Control>

Static members

Static member Description

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<Control> -> Control - The view to render when the route is activated

Returns: RouteDefinition<Control> A route definition

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<Control> -> Control

The view to render when the route is activated

Returns: RouteDefinition<Control>

A route definition

Route.define (name, path, handler)

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

Parameters:
Returns: RouteDefinition<Control> A route definition

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<Control> -> CancellationToken -> Task<Control>

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

Returns: RouteDefinition<Control>

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<Control> -> Async<Control> - The view to render when the route is activated

Returns: RouteDefinition<Control> A route definition

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<Control> -> Async<Control>

The view to render when the route is activated

Returns: RouteDefinition<Control>

A route definition

Type something to start searching.