ejs include wont pass local variable
问题 Using nodejs and expressjs with ejs as template engine. One of my routes uses: res.render('register',{ title: "Register", classname: "register", regdata: req.body, socialIcons: socialIcons, err: "pass" }); The register.ejs file looks like this: <!DOCTYPE html> <% console.log('In the template it gives:'); console.log(regdata) %> <html lang="en"> <head><% include partials/template/head.ejs %></head> <body class="<%= classname %>"> <% include partials/template/header.ejs %> <% include partials