[Vuejs]-Make part of a string bold in Javascript

0👍

If you can edit infoText, surround the price with <b> tags:

export default {
  data() {
    return {
      premiumContent: [
        {
          infoText: "Get this for only <b>€2,99</b> per month:",
        },
      ]
    }
  }
}

Then insert it into an element’s innerHTML using the v-html directive:

<div v-for="content of premiumContent"
     v-html="content.infoText">
</div>

demo

Leave a comment