我是新来的表达框架我只是想知道如何使用来自mongo DB的一些数据来渲染html页面我使用下面的代码发送html但不知道如何发送一些数据
res.sendFile(path + "feature.html"); this is success as html get renders
Run Code Online (Sandbox Code Playgroud)
像这样发送数据?
res.sendFile(path + "feature.html", {data: data});
Run Code Online (Sandbox Code Playgroud)
如何在html中显示数据?如果我发送了这样的数组
res.sendFile(path + "feature.html", {data: []});
Run Code Online (Sandbox Code Playgroud)
如何在html中循环这个?