Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a route. Internally, it stores a chain of handlers.

The route can be matched against a path and the handlers will be called in order they appear in the constructor.

It also parses the path and stores the parameters in the param ({@link RouteContext#param}) field of a RouteContext instance.

Hierarchy

  • Route

Index

Constructors

Methods

Constructors

  • new Route(pattern: string, handlers: RouteHandler[], matchingOptions?: RouteMatchingOptions): Route

Methods

  • Finds a handler.

    If the navigation is handled already, it will throw an error.

    Some properties of the context may be modified by the route handlers in this route.

    throws

    {@link RouterError} If the context is already handled.

    Parameters

    Returns undefined | false

    true if the route was able to handle the context, false otherwise.

Generated using TypeDoc