0.2.0 • Published 9 years ago
hr.history v0.2.0
hr.history
History and router utility for HappyRhino
Installation
$ npm install hr.history
Documentation
Create a router
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();
Navigate
router.navigate("post/:id", { id: "hello-world" });