Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Router

The router implementation. Usually, there is no need to call this class directly.

The only method one need is the navigateRoute method to call a route path programmaticially.

Hierarchy

  • Router

Index

Properties

onRouterAction

onRouterAction: RouteEventTarget

outlets

outlets: Array<HTMLElement> = []

Methods

navigateRoute

  • navigateRoute(requestedRoute: string, outletName?: string): void | never
  • Invoke a programmatic navigation to the given route. Falls back to default if route not found. Throws an error if no default route.

    Parameters

    • requestedRoute: string

      String value of the route's name. Same as in the href attribute when defining links.

    • Optional outletName: string

      The target. Can be omitted, if the default (main) router outlet is being adressed or the router configuration provides static outlets.

    Returns void | never

registerRouter

Static getInstance

  • getInstance(forceReset?: boolean): Router

Generated using TypeDoc