所以,我试图在重定向到节点
中的新目录后进行渲染BusinessAddressDB.create({
UserId : req.user.id,
MainAddress : {
Street : req.body.Street,
City : req.body.City,
ZipCode : req.body.ZipCode,
State : req.body.State,
Country : req.body.Country,
}
}, function(err){
//if(err) console.log('There is an error ' + err);
return res.redirect('/Business/CreateBusinessCategories');
})
然后我这样做
app.get('/Business/CreateBusinessCategories',function(req,res){
console.log("inside create categories"); // it goes inside here but it does not render
res.render('test.jade');
})
视图中的test.jade
doctype html
html(lang='en')
head
body
h2 Test Page
它没有给出任何错误,说它没有找到test.jade
....所以它找到了它。但不确定它无法呈现test.jade
有什么帮助吗?