No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Quasar v2 Meta plugin reactive meta props

    Framework
    1
    1
    278
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      adi_dragomir last edited by

      Hi,
      I create a brand new Quasar app v2.0.0-beta.9 with Meta plugin.
      I followed the Reactive example for 2 simple pages: index.vue and test. vue.
      Here there are the relevant script part for each page:

      1. index. vue

      setup() {
      const title = ref(“First page”); // we define the “title” prop
      const myDescription = ref({
      name: “description”,
      content: “First page quasar app”,
      });
      useMeta(() => {
      return {
      // whenever “title” from above changes, your meta will automatically update
      title: title.value,
      meta: {
      myKey: myDescription.value,
      },
      };
      });
      return {};
      },

      1. test.vue:

      setup() {
      const title = ref(“Test”); // we define the “title” prop
      const myDescription = ref({
      name: “description”,
      content:
      “Second page quasar app”,
      });
      useMeta(() => {
      return {
      title: title.value,
      meta: {
      myKey: myDescription.value,
      },
      };
      });
      return {};
      },

      The result is the title meta prop is always updated, but the description meta prop is not updated. Instead, it is added a new meta prop with the same name description like this:

      <meta name=“description” content=“A Quasar Framework app”>

      <meta name=“description” content=“First page quasar app” data-qmeta=“myKey”>

      Is this correct? I expected to be just one meta prop with the same name.

      Thank you very much for any help.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post