Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Latest commit

 

History

History
executable file
·
40 lines (33 loc) · 2.54 KB

ViewEngines.md

File metadata and controls

executable file
·
40 lines (33 loc) · 2.54 KB

模板引擎

默认的模板引擎是EJS

swapping out the view engine

为了使用不同的模板引擎,你应该在你的工程中使用npm安装,然后在config/views.js中设置sails.config.views.engine

比如,为了切换到Jade,运行run npm install jade --save-dev,然后在config/views.js中设置engine: 'jade'

模板引擎
添加新的自定义的模板引擎

如何添加一个模板引擎的支持没有罗列在上面的列表中,不过你可以查看这个链接地址:consolidate project