Logo Navs

Routes Type

Represents a collection of routes in the application.

Constructors

Constructor Description

Routes(?initialUri, ?noView, ?logger)

Full Usage: Routes(?initialUri, ?noView, ?logger)

Parameters:
    ?initialUri : string - The initial URI to set the route to when the router starts.
    ?noView : Control - An optional control to render when no route is matched.
    ?logger : ILogger - An optional logger to log the router's activity.

Returns: Routes

Initializes a new instance of the Routes class with an initial URI and an optional logger. /// The initial URI is used to set the initial route when the application starts.

If you don't provide an initial URI, the navigation will default to "/" if the route is not found the noView control will be rendered. And you will have to programmatically navigate to a route using the `Navigate` method.

?initialUri : string

The initial URI to set the route to when the router starts.

?noView : Control

An optional control to render when no route is matched.

?logger : ILogger

An optional logger to log the router's activity.

Returns: Routes

Instance members

Instance member Description

this.Children

Full Usage: this.Children

Returns: Route[]

Gets or sets the children routes.

Returns: Route[]

this.Router

Full Usage: this.Router

Returns: IRouter<Control> voption
Returns: IRouter<Control> voption

Static members

Static member Description

Routes.ChildrenProperty

Full Usage: Routes.ChildrenProperty

Returns: DirectProperty<Routes, Route[]>

Gets the property for children routes.

Returns: DirectProperty<Routes, Route[]>

Type something to start searching.