You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var partials = require('express-partials');
var list = require('./routes/list');
var app = express();
app.set('view engine', 'ejs');
app.use(partials());
app.use('/list', list);
1.安装express-partials
npm install express-partials -g
2.在app.js中引入
3.在list.js中
4.在list.ejs中:
<ul> <%- partial('listitem', items)%> </ul>
5.在listitem.ejs中:
<li><%= listitem %></li>
The text was updated successfully, but these errors were encountered: