@arcmantle/adapter-element
    Preparing search index...

    A reactive controller that performs location-based routing using a configuration of URL patterns and associated render callbacks.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    childRoutes: Routes[] = []
    currentParams: Record<string, string | undefined> = {}
    currentPathname: undefined | string
    currentRoute: undefined | RouteConfig
    fallback?: BaseRouteConfig

    A default fallback route which will always be matched if none of the routes match. Implicitly matches to the path "/*".

    host: ReactiveControllerHost & (AdapterElement | HTMLElement)
    onDisconnect: undefined | (() => void)

    Callback to call when this controller is disconnected.

    It's critical to call this immediately in hostDisconnected so that this controller instance doesn't receive a tail match meant for another route.

    parentRoutes: undefined | Routes
    previousPathname: string = ''
    routes: RouteConfig[] = []
    base: string = ...
    baseUrl: string = ''
    routeMeta: WeakMap<RouteConfig, any> = ...
    routing: Set<Promise<any>> = ...

    Accessors

    Methods

    • Navigates this routes controller to pathname.

      This does not navigate parent routes, so it isn't (yet) a general page navigation API. It does navigate child routes if pathname matches a pattern with a tail wildcard pattern (/*).

      Parameters

      • pathname: string

      Returns Promise<void>