erikringsmuth / app-router

Router for Web Components
https://erikringsmuth.github.io/app-router/
MIT License
610 stars 83 forks source link

Can not route on search parameters #108

Open liebrand opened 9 years ago

liebrand commented 9 years ago

I would like to be able to use a regex on not just the url path, but also the search parameters (eg ?foo=bar vs ?foo=eggs)

However, the line where it matches the route only takes the url.path in to consideration: https://github.com/erikringsmuth/app-router/blob/master/src/app-router.js#L207

should that not be url.path+url.search ?

Or is there a different/better way to route based on search parameters?