Base application router.

Constructors

  • Returns Router

Methods

  • Registers the route to the router.

    Parameters

    • route: Route

      Route to register.

    Returns this

  • Gets current route params.

    Returns {
        [key: string]: string;
    }

    • [key: string]: string
  • Parses current url.

    Returns Url

  • Parses current url.

    Parameters

    • params: boolean

      Indicates if the route params are returned with the url.

    Returns Url & {
        [key: string]: string;
    }

  • Pushes the state to the history.

    Returns void

  • Pushes the state to the history.

    Parameters

    • path: string

      URL path.

    Returns void

  • Pushes the state to the history.

    Parameters

    • path: string

      URL path.

    • q: {
          [key: string]: string;
      }

      Query string data.

      • [key: string]: string

    Returns void

  • Stringifies actual query with additional params.

    Returns string

  • Stringifies actual query with additional params.

    Parameters

    • q: {
          [key: string]: string;
      }

      Params to stringify.

      • [key: string]: string

    Returns string