To use raw HTML in a VUE JS template, users have to implement the v-HTML. We have to pass a reference to an HTML string in the data model to v-HTML present in component template.

Now, the raw HTML will be rendered into the component. Update the legacySystemHTML property and the HTML will update according to it.

Find high-quality VUE JS interview question and answers here for guaranteed career success.

Example

<template>

 <div v-html="legacySystemHTML"> </div>

</template>

<script> export default {

     data() {

     return {

      // Just like JSX! Oh wait...

      legacySystemHTML

   <FONT color="#faddad" size="-2">

   <MARQUEE>Please enter your name to continue.</MARQUEE>

    ... </FONT>

     }

   }

}

</script>

Suggest An Answer

No suggestions avaliable!