Returns the global router instance.
Registers a handler that will be called when an error occurs.
Navigates to the given path, it will create a new State instance with the given path.
It will then call pushState
on the history object with the state and path.
Lastly, it will delegate the next steps to {@link Router#navigateWithState}
by calling it with the state instance.
should be an absolute path
Redirects navigation to a path to another path.
The path to redirect.
The path to redirect to when the absolute path is matched.
Will stop the router and remove all routes and handlers registered.
Adds a route to the router.
The route pattern.
The route handlers.
A handler-adder object for chaining calls.
Start the router with the given options and sets itself as the global router, binds its event listeners to the environment.
Will stop the router and remove all event listeners and removes itself as the global router, does nothing if the router has not started.
Create a middleware with a router instance to be used as a nested router.
Will call stop on the global router and remove all event listeners. Will do nothing if the router has not started.
Generated using TypeDoc
The class responsible for routing and finding match to the correct handler.