Something like:
<div>
<%- if (condition) { %>
<div>This text will be shown if `condition` is true</div>
<%- } %>
</div>
The above example is not working so i'm asking if there is any way to use IF conditions inside the template string, I know that Underscore support it out of the box.
Use this:
<% if (condition) { %>...<% } %>
(in other words: remove the hyphen)
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