v-html
-
Expects:
String
-
Details:
Updates the element’s
innerHTML
. The contents are inserted as plain HTML - data bindings are ignored. If you need to reuse template pieces, you should use partials.Internally,
{{{ Mustache }}}
interpolations are also compiled as av-html
directive using anchor nodes. The directive form requires a wrapper element, but offers slightly better performance and avoids FOUC (Flash of Uncompiled Content).Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to XSS attacks. Only use
v-html
on trusted content and never on user-provided content. -
Example:
<div v-html="html"></div> <!-- same as --> <div>{{{html}}}</div>
Please login to continue.