You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A call to $goto('/components/tabs') yields a blank page - blocking the full app. I tried adding a [...fallback].svelte in the tabs folder, but that makes all routes like /components/tabs/blabla use the fallback.
I would have expected any fallback to kick-in on this route, or the route paramters to [...tabs].svelte being empty. But the [...tabs].svelte component does not seem to be loaded
A call to $goto('/components/tabs/blabla') gives an error : could not find destination node /components/tabs/blabla and then resolves to the generic fallback. Using $url only gives the error.
I would have expected this route to be loaded without complaints
So I made myself a workaround by changing the $goto route for /components/tabs to /components/tabs/[...tabs]. A $goto to /components/tabs/index won't work even though it is a child from the node under traverse('/components/tabs').
So ideally, if you ask me, if a folder (like components/tabs) has an index.svelte, then any $goto request to path /components/tabs hould resolve to that index.svelte in the folder. To me it's a sort of fallback route for that folder.
I am now fine with manually adding the /components/tabs/[...tabs] path as argument to $goto as this one works.
Hi @Tommertom sorry about the slow follow up. I agree that $goto should maybe automatically resolve the leaf index.svelte if one exists for the path.
It's worth pointing out that history.pushState can be used with Routify. $goto works the same as pushState, except $goto uses the internal filepath with destructured parameters. IIRC $goto(somepath) === history.pushState(${url(somepath)}).
Hi
I have a folder structure /components/tabs in my routes. It contains a [...tabs].svelte file to handle routes like /components/tabs/blabla
These resolve correctly - if I add the full url in the navigation bar - e.g. http://localhost:3000/components/tabs/blabla. Or https://ionicsvelte.firebaseapp.com/components/tabs/blabla
There seem to be two issues:
$goto('/components/tabs')
yields a blank page - blocking the full app. I tried adding a[...fallback].svelte
in the tabs folder, but that makes all routes like /components/tabs/blabla use the fallback.Calling tabs in the url also gives same result: https://ionicsvelte.firebaseapp.com/components/tabs
I would have expected any fallback to kick-in on this route, or the route paramters to [...tabs].svelte being empty. But the [...tabs].svelte component does not seem to be loaded
could not find destination node /components/tabs/blabla
and then resolves to the generic fallback. Using $url only gives the error.I would have expected this route to be loaded without complaints
Code related to tabs : https://github.com/Tommertom/svelte-ionic-app/tree/master/src/routes/components/tabs
Navigation code:
I had some struggles getting to understand how to do this in Routify3. If there is any help, would be appreciated!
The text was updated successfully, but these errors were encountered: