Open syropian opened 8 years ago
@syropian, i don't know.
You can try route.base('/app')
https://github.com/riot/route/tree/master/doc#routebasebase
There are some issues on Riot for supporting it: https://github.com/riot/riot/issues/685 Needs pushState (IE10+ http://caniuse.com/#search=pushstate)
@gabrielmoreira
Sorry I'm a little confused at the moment. Am hoping you could clear a few things up.
1) Does this extend Riot's built-in router? (http://riotjs.com/api/route/)
2) Is riot/route (https://github.com/riot/route) a totally separate module to use in place of Riot's built-in router? Or is it simply a standalone version of what's built in to the Riot library?
3) If riot/route
is completely separate is this compatible with it?
I only ask as I don't see anything about being able to use route.base()
in http://riotjs.com/api/route/, only in riot/route
. I attempted to pull in riot/route
and set route.base('/')
but your router is still only picking up on changes that have #
in the url.
@syropian Hi,
The addition of route.base
is recent and will probably be available from Riot 2.3 (current is 2.2) which is why it is not yet in the docs.
So if you are not too much in a hurry, your best bet is to try this module with route.base
when Riot 2.3 is out. AFAIK as I know it should work without any changes, but reply here or open a new issue if it does not.
Is there a way to omit the
#
prefix for routes, so I can link tomyapp.dev/foo
instead ofmyapp.dev/#/foo
?