millermedeiros / crossroads.js

JavaScript Routes
http://millermedeiros.github.com/crossroads.js/
1.44k stars 156 forks source link

Empty url in rules #158

Open vinibeloni opened 7 years ago

vinibeloni commented 7 years ago

Hi, (sorry for my English) I've this code: route ('/{index}' ,'index-page','../views/index', { index:['','home'] })

it return to me a obj valid to register routes, and work fine, but, if i add a empty url { index:["","home"] } the #home works, but the first index not, because its empty. So how can i add a empty value for my home page? I did not want create a new route for solve this problem... i trying add '/' , '#' but it does not work as it should.

Obs.: i use some like this ':rest*:', "404", "../views/notFound/on404" to not found page and all my routes works

thanks for attention (REALLY sorry for my English haha)