mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Update README.md
This commit is contained in:
parent
0e1f0af3b9
commit
5d82cf3d68
@ -28,7 +28,7 @@ Example with using `async/await`:
|
|||||||
```js
|
```js
|
||||||
export default {
|
export default {
|
||||||
async data ({ params }) {
|
async data ({ params }) {
|
||||||
let { data } = axios.get(`https://my-api/posts/${params.id}`)
|
let { data } = await axios.get(`https://my-api/posts/${params.id}`)
|
||||||
return { title: data.title }
|
return { title: data.title }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user