Nuxt/test/fixtures/children/pages/parent/_id.vue

21 lines
320 B
Vue
Raw Normal View History

2016-12-20 17:05:39 +00:00
<template>
2017-08-25 10:24:39 +00:00
<h2>Id={{ id }}</h2>
2016-12-20 17:05:39 +00:00
</template>
2017-08-25 10:24:39 +00:00
<script>
export default {
async asyncData({ route }) {
const asyncData = {};
await new Promise((resolve, reject) => {
setTimeout(() => {
asyncData.id = route.params.id;
resolve();
}, 50)
});
return asyncData;
}
}
</script>