mirror of
https://github.com/CryptKeeperZK/ejs.git
synced 2026-01-09 07:27:59 -05:00
added an example using echo and include
This commit is contained in:
@@ -8,3 +8,11 @@
|
||||
});
|
||||
-%>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<%
|
||||
users.forEach(function (user) {
|
||||
echo(include('./partial.ejs', {user: user}));
|
||||
});
|
||||
%>
|
||||
</ul>
|
||||
|
||||
4
examples/partial.ejs
Normal file
4
examples/partial.ejs
Normal file
@@ -0,0 +1,4 @@
|
||||
<li>
|
||||
<strong><%= user.name %></strong>
|
||||
is a <%= user.age %> year old <%= user.species %>
|
||||
</li>
|
||||
Reference in New Issue
Block a user