docs: add external parameter behavior navigateTo (#27472)

This commit is contained in:
Jakub Bednár 2024-06-07 10:05:08 +02:00 committed by GitHub
parent e60a912f33
commit 7b4f1a8b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,6 +52,18 @@ export default defineNuxtRouteMiddleware((to, from) => {
### External URL ### 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 ```vue
<script setup lang="ts"> <script setup lang="ts">
// will throw an error; // will throw an error;