res.render(';/index';)在node.js中不起作用
我正在尝试从routes.js文件呈现配置文件页面res.render(';/index';)在node.js中不起作用,node.js,express,Node.js,Express,我正在尝试从routes.js文件呈现配置文件页面 app.get('/loadProfile', function (req, res) { res.render('profile', { user: req.user, FBDates: FBDataset["Dates"], FBImpressions: FBDataset["Impressions"] }); }); 在运行服务器之后,控件进入这个/loadProfile,
app.get('/loadProfile', function (req, res) {
res.render('profile', {
user: req.user,
FBDates: FBDataset["Dates"],
FBImpressions: FBDataset["Impressions"]
});
});
在运行服务器之后,控件进入这个/loadProfile,但没有呈现概要文件页面,在终端中,我得到以下信息
GET /loadprofile 200 291ms - 3.97kb
如果我在浏览器中签入inspect元素下加载到网络中的页面,如何解决此问题。图像中的url是“localhost:8080/profile”。要查看呈现的配置文件视图,请导航到“localhost:8080/loadprofile”。如果我直接给出您所说的内容,您是正确的,页面将呈现,但在我的情况下,一旦我单击提交按钮,loadprofile页面将自动加载