History and router utility for HappyRhino
$ npm install hr.history
var history = require("hr.history");
var router = new history.Router({
routes: {
"post/:id": function(postId) {
// Do something with the post id
}
}
});
// Start handling history
router.start();router.navigate("post/:id", { id: "hello-world" });