0
How to include with node.js ?
I try "include ./header.ejs","include('header.ejs')", both didn't work. the page is just loading when i stop it there is no styling,There is no error in console,files in the same directory. Is there somethimg i forgot to install
2 Respostas
+ 2
Mostafa Esmail hi,
Isn't it something like that ?
<%- include("header"); -%>
https://stackoverflow.com/questions/5813771/in-ejs-template-engine-how-do-i-include-a-footer
https://ejs.co/
+ 1
i tried absolute path rather than relative one and it works as it worked for the root page only