hr.history

History and router utility for HappyRhino


License
Apache-2.0
Install
npm install hr.history@0.2.0

Documentation

hr.history Build Status

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" });