Nuxt/examples/custom-routes/pages/_user.vue
Sébastien Chopin cf24b926a1 Version 0.1.6
- Add example /custom-routes/
- Rename example/with-store/ to examples/vuex-store/
- Feature: Add .vue at the end of the component if not specified in
custom routes
- Feature: Add .params and .query in the context
- Feature: Add .name in route if given in custom routes
2016-11-07 21:38:51 +01:00

21 lines
326 B
Vue

<template>
<div class="user">
<h3>{{ name }}</h3>
<p>Email : {{ email }}</p>
</div>
</template>
<script>
import axios from 'axios'
export default {
data ({ params }) {
return axios.get(`http://jsonplaceholder.typicode.com/users/${params.id}`)
.then((res) => res.data)
}
}
</script>
<style>
</style>