riot / route

Simple isomorphic router
MIT License
212 stars 40 forks source link

Question: Is it possible with know the current route? #109

Closed pmcalabrese closed 4 years ago

pmcalabrese commented 7 years ago

I'd like to know my current route, there is a way with the router? or should I use regular JS?

bminer commented 7 years ago

I have the same issue. How do you quickly query the current route?

Parsing window.location can be a bummer, especially with route.base, etc.

Use case: set class='active' for anchor tags that match the current route.

jrmykolyn commented 6 years ago

Hey @pmcalabrese

Do you need to transform/adjust the current route (ie. are you trying to extracting a value from it), or is your use cases similar to what @bminer described (ie. emphasize links which match the current route)?

GianlucaGuarini commented 4 years ago

Closing this issue because it's related to an old router version. Please update to the latest @riotjs/route version if you can.