<% layout('layout') -%>
<h1><%= title %></h1>
<p><%= body %></p>
Route:
exports.index = function(req, res){
res.render('index', { title: 'this is a test', body: 'test body' } );
};
Renders:
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
test body
</body>
</html>
Expected:
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<h1>this is a test</h1>
<p>test body</p>
</body>
</html>
I've since changed my view to use "content" instead of "body" but thought it was best to bring this up. If it's expected behavior, you might want to add it to the readme.
views/layout.ejs:
views/post.ejs:
Route:
Renders:
Expected:
I've since changed my view to use "content" instead of "body" but thought it was best to bring this up. If it's expected behavior, you might want to add it to the readme.