Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 535 Bytes

readme.md

File metadata and controls

33 lines (22 loc) · 535 Bytes

Route.js

needs docs :)

//simple route
route('/dashboard/',function(){});

//arguments
route('/blog/post/:id',function(id){

});

//optional arguments
route('/blog/posts(/:filter)',function(filter){

});

//int argument
route('/product/:int',function(id){});

//a-z argument
route('/user/:az',function(username){});

//alphanumeric type
route('/user/:alnum',function(username){});

route(function(){
   // the default route if nothing else matched
});

route(location.pathname); //any string will start off routing