rootr
Overview
A router for single page apps:
- Wraps DOM APIs for window and history.
- Routes defined with paths, similar to express.
- Content loaded async. Works with code splitting.
Usage
Setup
var loadContent loadRoutes = let routes = path: '/' System path: '*' System
Open path programmically
location
Use redirect
to change the URL without adding an entry to the history state.
location
Replace routes
Change the routes.