Svelte · Junior · Question 50 of 76
How do you create a route with a parameter, like /blog/hello-world?
- ✓Correct answer: A folder named
[slug]:src/routes/blog/[slug]/+page.svelte - 2A file named
blog/:slug.svelte - 3A folder named
{slug}
Explanation
The value is available as params.slug in load and in page.params. [...rest] matches several segments, [[optional]] an optional one.