mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
docs: add warning that pages need single root element (#1070)
This commit is contained in:
parent
61518a972f
commit
0591350f5b
@ -10,6 +10,10 @@ The `pages/` directory is optional, meaning that if you only use [app.vue](/docs
|
|||||||
|
|
||||||
Nuxt will automatically integrate [Vue Router](https://next.router.vuejs.org/) and map `pages/` directory into the routes of your application.
|
Nuxt will automatically integrate [Vue Router](https://next.router.vuejs.org/) and map `pages/` directory into the routes of your application.
|
||||||
|
|
||||||
|
::alert{type=warning}
|
||||||
|
Unlike components, your pages must have a single root element to allow Nuxt to apply route transitions between pages.
|
||||||
|
::
|
||||||
|
|
||||||
## Dynamic Routes
|
## Dynamic Routes
|
||||||
|
|
||||||
If you place anything within square brackets, it will be turned into a [dynamic route](https://next.router.vuejs.org/guide/essentials/dynamic-matching.html) parameter. You can mix and match multiple parameters and even non-dynamic text within a file name or directory.
|
If you place anything within square brackets, it will be turned into a [dynamic route](https://next.router.vuejs.org/guide/essentials/dynamic-matching.html) parameter. You can mix and match multiple parameters and even non-dynamic text within a file name or directory.
|
||||||
|
Loading…
Reference in New Issue
Block a user