module:MHashRouter

module:MHashRouter

Router that uses hash for routing.

Constructor

new (require("MHashRouter"))(parentHTMLElementID)

Description:
  • Constructor.

Parameters:
Name Type Description
parentHTMLElementID string

Parent HTML element ID.

Throws:
  • If HTML element with given parentHTMLElementID` doesn't exist.
Type
HTMLElementDoesNotExistException

Extends

  • module:MRouter

Methods

addRootRoute(widget)

Description:
  • Add a route for root path, which is #.

Parameters:
Name Type Description
widget MWidget

A widget that inherits MWidget.