mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: add external parameter behavior navigateTo (#27472)
This commit is contained in:
parent
e60a912f33
commit
7b4f1a8b72
@ -52,6 +52,18 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
||||
|
||||
### External URL
|
||||
|
||||
The `external` parameter in `navigateTo` influences how navigating to URLs is handled:
|
||||
|
||||
- **Without `external: true`**:
|
||||
- Internal URLs navigate as expected.
|
||||
- External URLs throw an error.
|
||||
|
||||
- **With `external: true`**:
|
||||
- Internal URLs navigate with a full-page reload.
|
||||
- External URLs navigate as expected.
|
||||
|
||||
#### Example
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
// will throw an error;
|
||||
|
Loading…
Reference in New Issue
Block a user