Just started using ejs template and found out
<% if(...) { %> xxx <% } %>
But if
<% if(...) { %> xxx <% } %><% else { %> xxx <% } %>
The compilation directly reports an error. Does ejs not support else syntax?
if’s } is placed in front of else
}
<% if(...) { %> xxx <% } else { %> xxx <% } %>
if’s
}
is placed in front of else