When working with Vue.js, I often use {{}} to display my data on the HTML page. However, I recently encountered a situation where my data includes a string with
tags that I would like to be rendered as actual HTML tags when displayed.
data(){
return {
bodyText: 'aaaaaa<br>aaaaaa'
}
}
<p>{{bodyText}}</p>
My desired output within a span tag would look like this:
aaaaaa
aaaaaa
But instead, the actual result is:
aaaaaa<br>aaaaaa