Nuxt/test/fixtures/children/pages/parent/_id.vue
2017-08-25 12:24:49 +02:00

21 lines
320 B
Vue

<template>
<h2>Id={{ id }}</h2>
</template>
<script>
export default {
async asyncData({ route }) {
const asyncData = {};
await new Promise((resolve, reject) => {
setTimeout(() => {
asyncData.id = route.params.id;
resolve();
}, 50)
});
return asyncData;
}
}
</script>