When I pass res.render object then in .ejs file it is undefined
问题 I want to show values of post object in my profilearea.ejs file.But when it renders to profilearea.ejs then it gives an error that "post is not defined". Here is the code in node.js PersonalInfo.findOne({username:req.body.name}, function(err,post){ if(err || !post) { console.log("find is not done"); } else res.render('profilearea.ejs', {post:post}); } }) This is the code in profilearea.ejs file <section id="notification" data-role="page" > <header data-role="header" data-theme="b"><h2