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

Vue - v-html directive for outputting HTML

0 votes
added Nov 7, 2019 in Vue by LC Marshal Captain (25,840 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, 2019 by LC Marshal Captain (25,840 points)
<p>With double mustache: {{ rawHtml }}</p>
<p>With v-html directive: <span v-html="rawHtml"></span></p> - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.