Thomas Anderson
Thomas Anderson

Reputation: 136

How to use more than one URL parameter in sapper/svelte

I just started learning svelte. After reading some of sapper documentation i saw that sapper use file names and folder structure for routing and if i want something like /blog/:article its possible create a folder with 'blog' name and file '[slug].svelte' inside, how i can construct more complex routes? Example: /blog/:article/comments/:commentId

Upvotes: 4

Views: 1810

Answers (1)

Rich Harris
Rich Harris

Reputation: 29585

src/routes/blog/[article]/comments/[commentId].svelte

or

src/routes/blog/[article]/comments/[commentId]/index.svelte

Upvotes: 6

Related Questions