Suppose I have a string <span class="msg">Text goes here</span>
.I need to use this string as a HTML element in my webpage. Any ideas on how to do it?
Mithril provides the m.trust
method for this. At the place in your view where you want the HTML output, write m.trust( '<span class="msg">Text goes here</span>' )
and you should be sorted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With