mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
docs: add info about dynamic nested routes (#22862)
This commit is contained in:
parent
d905e5f519
commit
bfd06589fd
@ -134,6 +134,10 @@ if (route.params.group === 'admins' && !route.params.id) {
|
||||
</script>
|
||||
```
|
||||
|
||||
::alert{type="info"}
|
||||
Named parent routes will take priority over nested dynamic routes. For the `/foo/hello` route, `~/pages/foo.vue` will take priority over `~/pages/foo/[slug].vue` . Use `~/pages/foo/index.vue` and `~/pages/foo/[slug].vue` to match `/foo` and `/foo/hello` with different pages,.
|
||||
::
|
||||
|
||||
## Catch-all Route
|
||||
|
||||
If you need a catch-all route, you create it by using a file named like `[...slug].vue`. This will match _all_ routes under that path.
|
||||
|
Loading…
Reference in New Issue
Block a user