1
0
mirror of https://github.com/nuxt/nuxt.git synced 2024-12-21 11:47:14 +00:00
Nuxt/test/fixtures/children/pages/parent.vue
2017-10-31 14:26:19 +01:00

24 lines
368 B
Vue

<template>
<div>
<h1>I am the {{ name }}</h1>
<nuxt-child></nuxt-child>
</div>
</template>
<script>
export default {
async asyncData({ route }) {
const asyncData = {}
await new Promise((resolve, reject) => {
setTimeout(() => {
asyncData.name = 'parent'
resolve()
}, 100)
})
return asyncData
}
}
</script>