Initial commit
This commit is contained in:
23
pages/routes.vue
Normal file
23
pages/routes.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Routen-Übersicht</h1>
|
||||
<ul>
|
||||
<li v-for="route in routes" :key="route.path">
|
||||
<NuxtLink :to="route.path">{{ route.path }}</NuxtLink>
|
||||
<ul v-if="route.children">
|
||||
<li v-for="child in route.children" :key="child.path">
|
||||
<NuxtLink :to="child.path">{{ child.path }}</NuxtLink>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { NuxtLink } from '#components'
|
||||
|
||||
const router = useRouter()
|
||||
const routes = router.getRoutes()
|
||||
</script>
|
Reference in New Issue
Block a user