hash-router
A frontend router for the hash change event
Example
var HashRouter = var router = routerrouter router window // start the router
Docs
type RouteHandler := (hash: String, opts: { params: Object, splats: Array<String>, newUrl: String, oldUrl: String}) => void hash-router := (opts?: { setRoute?: (String) => void, getRoute?: () => String}) => EventEmitter & { (HashChangeEvent?) => void, go: (String) => void, get: () => String, addRoute: (pattern: String | RegExp, handler: RouteHandler) => void}
Installation
npm install hash-router
Contributors
- Raynos