Express ejs 3.* layout.ejs

新版本改为了 <%- include file.ejs %>css

具体使用方法以下:
1. views文件夹 下新建header.ejs,插入代码html

<html><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><title>Index</title><linkrel="stylesheet"href="stylesheets/style.css"></head><body>
    1. views文件夹 下新建footer.ejs,插入代码ui

      </body>
      </html>spa

    2. 修改index.ejs的代码以下code

      <%- include header %>
      Hello,world!
      <%- include footer %>htm

相关文章
相关标签/搜索