Nuxt/examples/axios/pages/index.vue

18 lines
240 B
Vue
Raw Normal View History

2017-10-29 09:08:42 +00:00
<template>
<div>
<h1>Dog</h1>
<img :src="dog" >
2017-10-29 09:08:42 +00:00
</div>
</template>
<script>
export default {
2017-10-31 13:43:55 +00:00
async asyncData({ app }) {
2017-10-29 09:08:42 +00:00
const { data: { message: dog } } = await app.$axios.get('/dog')
return { dog }
}
}
</script>