Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

Vue - v-html directive for outputting HTML

0 votes
4 views
added Nov 7 in Vue by LC Marshal Captain (25,420 points)
<!--remove html character-->
<template v-html="filteredUnsafeString">
 
<!--other methods:-->
<!--instead of : {{ propertyData['property-detail'] }}-->
use: <span v-html="propertyData['property-detail']"></span>

 

1 Response

0 votes
responded Nov 7 by LC Marshal Captain (25,420 points)
<p>With double mustache: {{ rawHtml }}</p>
<p>With v-html directive: <span v-html="rawHtml"></span></p>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...