Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Router<T, U>

Router that two-way binds the fragment (also called hash) of the URI of the current window/tab and the application state.

Type parameters

  • T: App<U>

    Type of the application subclass.

  • U: Settings

    Type of of the user-provided state; that is, of App.settings.

Hierarchy

  • Router

Index

Constructors

Constructors

constructor

  • new Router(app: T, assignApp: function, assignSettings: function): Router
  • Constructor.

    Parameters

    • app: T

      The user-provided application state.

    • assignApp: function

      Function that updates the application state to the given values in a plain JSON object.

        • Parameters

          • app: Plain<T>

            plain JSON object

          Returns any

    • assignSettings: function

      Function that updates the application settings to the given values in a plain JSON object.

        • (settings: Plain<U>): any
        • Parameters

          Returns any

    Returns Router

Generated using TypeDoc