0.2.0 • Published 9 years ago

hr.history v0.2.0

Weekly downloads
10
License
-
Repository
github
Last release
9 years ago

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