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
The reason behind it is that named params id in this example, are optional so /a/123 and /a are rendered by the same component Comp2 in the first case the param id will be 123 and in the second it'll be empty.
Then you can have nested routes but you need to use the nested route property to indicate it.
Here's a REPL that doesn't seem to be working on the website, but illustrates the situation if you run locally.
https://svelte.dev/repl/13608c5e9280428f81c0b8dc9bc2b97c?version=3.29.4
If you go to
/a
, it correctly outputs 2If you go to
/a/b
, I would expect it to output 3 but it outputs 4 and redirects to/a
If you go to
/a/b/c
, it outputs 4 and redirects to/a/c
Why is this not behaving as expected? Am I doing something wrong?
The text was updated successfully, but these errors were encountered: