How can ejs
display characters without using <%=%>
?
For example, I don't know how to write when:
<a href="class="<%
// Add active to class depending on condition
if(hoge){
"active"
}
%>">
I'm afraid I don't have the environment at hand, but how about the following?
<%var active=hoge?"active":"%>
<a href="class="<%=active%>">>
© 2024 OneMinuteCode. All rights reserved.