I was trying to figure out how to render a view inside a view, as I was stuck with this issue.
I was using Node.js platform with ejs template engine.
My index.ejs file has an included header.ejs file.
Everything works well except that I can't pass values to the variable status in header.ejs.
Here is my abstract code...
The solution is as easy as this.
Just remove .ejs extension from the include command.
I spent at least an entire night to figure it out.
Horrible Effects of Misplaced Extensions ;)
My index.ejs file has an included header.ejs file.
Everything works well except that I can't pass values to the variable status in header.ejs.
Here is my abstract code...
index.ejs
header.ejs
app.js
The most funniest solution ever!
Just remove .ejs extension from the include command.
I spent at least an entire night to figure it out.
I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
ReplyDeleteEthical Hacking Course in Chennai
Hacking Course in Chennai
Hacking Classes in Chennai
Blue Prism Training in Chennai
CCNA Course in Chennai
Cloud Computing Training in Chennai
Ethical Hacking Training in OMR