Nuxt/playground/pages/index.vue
Daniel Roe efabacd8e2
feat(app): asyncData with global state and explicit key (#37)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
2021-04-03 12:03:20 +02:00

29 lines
569 B
Vue

<template>
<div>
<h2>
Hello world
</h2>
<strong>Playground pages</strong>
<ul>
<li v-for="link of links" :key="link">
<nuxt-link :to="link">
{{ link }}
</nuxt-link>
</li>
</ul>
</div>
</template>
<script>
import { defineComponent } from 'vue'
import { useRouter } from 'vue-router'
export default defineComponent({
setup () {
const links = useRouter().getRoutes().filter(route => ['index', '404'].includes(route.name) === false).map(route => route.path)
return { links }
}
})
</script>