mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-03 19:07:15 +00:00
Update README.md
This commit is contained in:
parent
0e1f0af3b9
commit
5d82cf3d68
@ -28,7 +28,7 @@ Example with using `async/await`:
|
||||
```js
|
||||
export default {
|
||||
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 }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user