Home

Issue: 171

Setting head data from ajax request on page.

[issue link]

Ok so I have something like this

  export default {
    data ({error}) {
      return axios.get(`http://api.dev/content`)
      .then((res) => {
        return res.data
      }).catch((e) => {
        return error({ statusCode: 404, message: e.message })
      })
    },
    head: {
      title: 'Home Page',
      meta: [
        { hid: 'description', name: 'description', content: 'Home page description' }
      ]
    }

  }

but where the head.title and meta tags are, I’d like to pull that value in dynamically. like from data.page.title or something along those lines. How would I do that here?

This question is available on Nuxt.js community (#c145)