Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Router

Hierarchy

  • Router

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Router(root?: string, useHash?: boolean, hash?: string): Router
  • Parameters

    • Optional root: string

      the domain server

    • Optional useHash: boolean

      if you want use hash in the router

    • Optional hash: string

      hash to use

    Returns Router

Properties

router

router: Navigo

Methods

build

  • build<Route>(routes: Route[], builder: function, parentPath?: string | null, rootElement?: Element, extraParams?: any): void
  • Type parameters

    Parameters

    • routes: Route[]

      array with every route

    • builder: function

      the function to build the page of every route

        • (route: Route, params: Params, query: string, rootElement?: Element, extraParams?: any): void
        • Parameters

          • route: Route
          • params: Params
          • query: string
          • Optional rootElement: Element
          • Optional extraParams: any

          Returns void

    • Optional parentPath: string | null

      the route parent path

    • Optional rootElement: Element

      the parent dom element where every route builds its page dom structure

    • Optional extraParams: any

      Additional Params to allow add features to builder

    Returns void

Generated using TypeDoc