about uscontact

How to set header from asyncData in NuxtJS

Author: zemna
Date: April 17, 2021
Share this:

You can access asyncData if you you head() function.

Use 'head()' function in your script, not 'head:'

export default {
  head() {
    return {
      title: this.tag.name
  async asyncData({ $content, params }) {
    const tag = await $content('tags', params.slug).fetch()
    return {
Share this:

Leave a Reply

Your email address will not be published.


Professional software development agency estalished in Indonesia. We offers website setup, web application development, fulfillment service, and etc.
Follow us
Follow us to get latest news and tutorials.
2022 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️