Closed allmors closed 3 months ago
Do you set the prefix
to the sub-routers? See docs/examples: https://github.com/ItalyPaleAle/svelte-spa-router/blob/main/Advanced%20Usage.md#nested-routers
Do you set the
prefix
to the sub-routers? See docs/examples: https://github.com/ItalyPaleAle/svelte-spa-router/blob/main/Advanced%20Usage.md#nested-routers
Yes, there is a setting
I found a problem. It was my mistake. My routing used the form of params, which caused the routing failure problem.
Incorrect example
const routes = {
'/:blacklist': BlackList,
'/:setting': Setting,
}
Correct example
const routes = {
'/blacklist': BlackList,
'/setting': Setting,
}
Thanks for your answer
The type of effect I want is vue-router routing with nested sub-routing. Here is my example. My different paths correspond to different components, but the plug-in seems to be that if this path is used by other routes, the same type cannot be used.
Unable to achieve effect
can achieve the effect
But what I want is that different components can be used with different pathnames in the relevant cascade
In short, it is as follows:
/dashboard/blacklist
Use BlackList component/dashboard/setting
Use Setting component