html5-router
v2.0.0
Published
A uri router backed by html5 history api
Downloads
12
Readme
html5-router
A uri router backed by html5 history api
Example
var Router = require("html5-router")
var router = Router()
router.addRoute("/", renderHome)
router.addRoute("/login", showLoginDialog)
router.on("route", function (event) {
console.log("event", { url: event.url, data: event.data })
})
Router.on("popstate", router)
router()
Installation
npm install html5-router
Contributors
- Raynos