2017-02-03 14:09:27 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<h1>{{ $route.params.slug || 'Home' }}</h1>
|
|
|
|
<pre>{{ userAgent }}</pre>
|
|
|
|
<ul>
|
2018-11-24 18:49:19 +00:00
|
|
|
<li>
|
|
|
|
<NuxtLink to="/">
|
|
|
|
Home
|
|
|
|
</NuxtLink>
|
|
|
|
</li>
|
2017-11-26 13:40:57 +00:00
|
|
|
<li v-for="(slug, index) in slugs" :key="index">
|
2018-11-24 18:49:19 +00:00
|
|
|
<NuxtLink :to="{ name: 'slug', params: { slug } }">
|
|
|
|
{{ slug }}
|
|
|
|
</NuxtLink>
|
2017-11-26 13:40:57 +00:00
|
|
|
</li>
|
2017-02-03 14:09:27 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2019-07-10 10:45:49 +00:00
|
|
|
asyncData ({ store, route, userAgent }) {
|
2017-02-03 14:09:27 +00:00
|
|
|
return {
|
|
|
|
userAgent,
|
|
|
|
slugs: [
|
|
|
|
'foo',
|
|
|
|
'bar',
|
|
|
|
'baz'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|