How to include html code in a view?

后端 未结 2 1067
醉梦人生
醉梦人生 2021-01-05 10:01

I\'m using express.js and EJS as template engine. I don\'t understand how to use partials, I have seen at the examples but the author used

2条回答
  •  [愿得一人]
    2021-01-05 10:39

    Its an old thread, but here is how you do it in the newer version of EJS.

    <% include part1 %>
    

    given part1.ejs contains the html you wish to include.

提交回复
热议问题