Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Make goto work with relative routes #1033

Closed
verschmelzen opened this issue Dec 21, 2019 · 2 comments
Closed

Make goto work with relative routes #1033

verschmelzen opened this issue Dec 21, 2019 · 2 comments

Comments

@verschmelzen
Copy link

When using goto method from '@sapper/app' on relative paths, i.e. starting with ./, navigation is made relative to root.

I expect it to work as href in case when route is inside sapper application.

Now for every page that has relative navigation I have to implement prefetch and manualy store current path in component variable or reach for window.location.pathname.

I am using SSR mode and didn't test behavior in other cases.

@thgh
Copy link
Contributor

thgh commented Dec 21, 2019

Related to #984, my preferred workaround is using $page.path and $page.params however

@Conduitry
Copy link
Member

Yeah I'd say this is a duplicate of #904.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants