Intro to Sveltekit Routing

preview_player
Показать описание
Just the basics!

Рекомендации по теме
Комментарии
Автор

I'm having a weird issue. My website has a homepage at routes/+page.svelte and a navigation bar on the homepage located at routes/Nav.svelte. Whenever I have nested pages inside /about/, the navigation bar wants to try to append /about/ to the start of every nav bar link.

So if I'm on the homepage, clicking 'about' goes to /about, but if I'm already on the /about page, the same nav bar link goes to /about/about, which shows to a 404. How do I fix this?

Actionme
Автор

Welcome back, It's been a while :)

fkaspow
Автор

Nice video ! Is there any way for the load function and the "data" input to be type safe ?

EtienneQuarez
Автор

With this import it is not necessary to create the file + page.ts
import { page } from '$app/stores';
const {employee} = $page.params

xXkeissiusXx