如何在 sapper/svelte 中使用多个 URL 参数
How to use more than one URL parameter in sapper/svelte
我刚开始学苗条。在阅读了一些 sapper 文档后,我看到 sapper 使用文件名和文件夹结构进行路由,如果我想要类似 /blog/:article 的东西,它可能会创建一个名称为 'blog' 的文件夹和文件 '[slug].svelte'在里面,我如何构建更复杂的路线?示例:/blog/:article/comments/:commentId
src/routes/blog/[article]/comments/[commentId].svelte
或
src/routes/blog/[article]/comments/[commentId]/index.svelte
我刚开始学苗条。在阅读了一些 sapper 文档后,我看到 sapper 使用文件名和文件夹结构进行路由,如果我想要类似 /blog/:article 的东西,它可能会创建一个名称为 'blog' 的文件夹和文件 '[slug].svelte'在里面,我如何构建更复杂的路线?示例:/blog/:article/comments/:commentId
src/routes/blog/[article]/comments/[commentId].svelte
或
src/routes/blog/[article]/comments/[commentId]/index.svelte