ejs include function can not find the template with html extension

April 28, 2013 in answer

0 votes, 0.00 avg. rating (0% score)

ANSWER:

As Elie Gnrd is suggesting, you use .ejs files directly by changing the view engine configuration of Express.

If that isn’t an option, and you want/need to keep using .html as an extension for your templates, you have to be explicit in the include:

<% include head.html %>

robertklep from http://stackoverflow.com/questions/16263633