mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +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>
|
</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
|
## 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.
|
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