I am currently working on an app that utilizes dynamic binding, where <> is a way to fetch data from the API dynamically. However, I am facing an issue when trying to render it in vhtml as the parent element is not displaying at all. My goal is to have the output look like this: Name: <<Name>>
. Any ideas on how I can achieve this? Examples of code are attached below.
const app = new Vue({
el: '#app',
data () {
return {
htmlText: '<p> Name : <<Name>> </p>'
}
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
<span v-html="htmlText"></span>
</div>