routely-js

0.0.7 • Public • Published

/ly

NPM

Simple hash router with no dependencies (based on the backbone.js router).

Install

$ npm install routely-js

example

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

Readme

Keywords

none

Package Sidebar

Install

npm i routely-js

Weekly Downloads

1

Version

0.0.7

License

MIT

Last publish

Collaborators

  • paulserraino