Markupless Documentation - v0.4.3
    Preparing search index...

    Class Router

    Manages client-side routing using the History API.

    Index

    Constructors

    Methods

    • Checks if any routes have been registered.

      Returns boolean

      True if routes exist.

    • Navigates to a new path programmatically.

      Parameters

      • path: string

        The destination path.

      Returns void

    • Registers a route.

      Parameters

      • path: string

        The URL path to match.

      • handler: RouteHandler

        The component or factory function to render.

      Returns void

    • Subscribes a listener to route changes.

      Parameters

      • listener: Function

        Function to call on route change.

      Returns void