flatiron / director

a tiny and isomorphic URL router for JavaScript
http://github.com/flatiron/director
MIT License
5.6k stars 486 forks source link

Make parameter optional #347

Open nmsobri opened 7 years ago

nmsobri commented 7 years ago

Is there a way to make parameter optional? I cant see anywhere in the documentation being mention

Router({
    '/foo/:optional_param' : function(){}  })

/foo or foo/bar will trigger this route