routely-js
v0.0.7
Published
Simple hash router with no dependencies
Downloads
5
Readme
/ly
Simple hash router with no dependencies (based on the backbone.js router).
#Install
$ npm install routely-js
var router = new Routely();
router.route('/', function () {
console.log('index page');
});
router.route('/about', function () {
console.log('about page');
});
router.route('/user/:id', function (id) {
console.log("user " + id + " page");
});
router.route('/user/:id/posts/:slug', function (id, slug) {
console.log("user " + id + " post " + slug + " page");
});
##Contribute
$ npm install
$ npm test
##License MIT