I have a simple EJS template:
<% layout('layout') -%>
<section class="content">
<div ng-view>
<h2><%= mongoFormName %></h2>
</div>
</section>
But I am getting an error:
ReferenceError: H:\building-angularjs-nodejs-apps-mean\3-building-angularjs-node
js-apps-mean-m3-exercise-files\FormManager\form-manager\server\views\index.ejs:1
>> 1| <% layout('layout') -%>
2| <section class="content">
3| <div ng-view>
4| <h2><%= mongoFormName %></h2>
layout is not defined
Is it the keyword 'layout' that is undefined? I changed the argument to 'layout' and I still got the error that 'layout is not defined'. So my conclusion is that the keyword layout is not defined. I think I followed the steps in the documentation:
var express = require('express'),
engine = require('ejs-mate'),
. . . .
app.engine('ejs', engine);
app.set('views', __dirname + '/server/views');
app.set('view engine', 'ejs');
Thank you.
I have a simple EJS template:
But I am getting an error:
Is it the keyword 'layout' that is undefined? I changed the argument to 'layout' and I still got the error that 'layout is not defined'. So my conclusion is that the keyword layout is not defined. I think I followed the steps in the documentation:
Thank you.