choojs / choojs/choo

Running Router On a Specific Path with Hash Routing

Open
#690 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.8k
Forks
573
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.