UNPKG

xtemplate

Version:

eXtensible Template Engine lib on browser and nodejs. support async control, inheritance, include, logic expression, custom function and more.

27 lines 624 B
<!DOCTYPE html> <html lang="en"> <head> <title><%= title %></title> <script type="text/javascript"> if (foo) { bar(1 + 5) } </script> </head> <body> <h1>ejs - node template engine</h1> <div id="container" class="col"></div> <% if (using) {%> <p>You are amazing</p> <% } else { %> <p>Get on it!</p> <%}%> <p>paragraph paragraph paragraph paragraph</p> <ul> <% lis.forEach(function(li,index) {%> <li><%= index %>: <%= li.d %> of <%= title %></li> </ul> <% }) %> </body> </html> <% include includes/ejs_part%>