Running Router On a Specific Path with Hash Routing
Author: AcidLeroyCreated Nov 5, 2018Updated Mar 17, 2026
This is more of a help wanted issue. The problem that I am having is that I am attempting to put a choo.js app that is not on the root path of site, i.e. mysite.com/#userid. Instead, I am attempting to run the site on mysite.com/biz/baz/myapp/#userid. What do I need to do, assuming I don't have server control, to get my hash routes to work on an arbitrary root location on the path?
I've tried the following and this didn't work for me:
const prefix = '/biz/baz/myapp'
app.route(prefix+'/', welcome)
app.route(prefix+'#:userid', user)Is there a trick that I need to do in order to stick my choo app on a subregion of mysite?
Thanks!
Source: choojs/choo