visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

link to '/' does not route to base #541

Open FaBeyyy opened 5 years ago

FaBeyyy commented 5 years ago

When a page base is set e.g page.base('/test') and you have an anchor element pointing to index e.g <a href="/" page.js should route to /test and not /

tkottke90 commented 4 years ago

Disclaimer: Not a contributor but a new user myself.

It looks like as of now the functionality you described is how the module works. Here is a stackblitz I had of the basic configuration where I used a base of /test and when hit the root route, I get back to /test/:

https://stackblitz.com/edit/pagejs-basic?file=index.js

The About page has an anchor tag that should take you back home