Question

Is it possible to add non html comments in underscore.js or lodash ?

Something like :

<%-- We do this here because... %>

So that the comment is not in the resulting generated html code ?

If I write :

<!-- We do this here because... -->

The comment is in the resulting html.

Thank you.

Was it helpful?

Solution

It is a client side template, you'll still see the comment, but it won't repeat etc...

<%
// comments go here
%>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top