mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-19 17:39:39 +03:00
23 lines
463 B
Markdown
23 lines
463 B
Markdown
# How to use async data in metaInfo?
|
|
|
|
`vue-meta` will do this for you automatically when your component state changes.
|
|
|
|
Just make sure that you're using the function form of `metaInfo`:
|
|
|
|
```js
|
|
{
|
|
data () {
|
|
return {
|
|
title: 'Foo Bar Baz'
|
|
}
|
|
},
|
|
metaInfo () {
|
|
return {
|
|
title: this.title
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Check out the [vuex-async](https://github.com/nuxt/vue-meta/tree/master/examples/vuex-async) example for a more detailed demonstration
|