npm.io
0.2.0 • Published 11 years ago

hr.history

Licence
Version
0.2.0
Deps
3
Vulns
0
Weekly
0

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