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
importHomefrom'./routes/Home.svelte'importAuthorfrom'./routes/Author.svelte'importBookfrom'./routes/Book.svelte'importNotFoundfrom'./routes/NotFound.svelte'constroutes={// Exact path'/': Home,// Using named parameters, with last being optional'/author/:first/:last?': Author,// Wildcard parameter'/book/*': Book,// Catch-all// This is optional, but if present it must be the last'*': NotFound,}
svelte是如何进行页面路由的呢,让我们一起来看看他们的文档中是怎么说的吧
点我看看
显然我们没有用到SvelteKit, 但是在文档其中列出的许多很多可以替代的工具,比如svelte-spa-router
大家也可以了解一下其他的路由插件,可以在下面和我交流一下。
The text was updated successfully, but these errors were encountered: