1
Q
快递
A
回答
2
一个简单的方法是使用快速点:
npm install express-dot
,并在您app.js:
var doT = require('express-dot');
// (optional) set globals any thing you want to be exposed by this in {{= }} and in def {{# }}
doT.setGlobals({ ... });
app.set('view engine', 'dot');
app.engine('dot', doT.__express);
原因,故建议撰写自己的generalhenry说。
如果你这样做,你会明白表达和点更好。
express-dot不支持预编译,所以我在我的Github仓库中有一个简单的pre-compile example。
祝你好运。
相关问题
- 1. 快递和快递邮件
- 2. 更快块快递
- 3. 快递
- 4. 快递未在快递中定义
- 5. Socket.io +快递:快递报关差错
- 6. Node.js的快递
- 7. 在快递
- 8. 听在快递
- 9. 快递app.use
- 10. 快递航线
- 11. iisnode和快递
- 12. 快递的ErrorHandler()
- 13. 在快递
- 14. 快递链接
- 15. 快递节点
- 16. 与快递
- 17. 使用快递
- 18. 快递:在Chrome
- 19. 在快递
- 20. 使用快递
- 21. 快递JS
- 22. 快递API。参数传递
- 23. 坐落在快递
- 24. 向前快递JS
- 25. 创建IIS快递
- 26. HTML形式快递
- 27. IIS快递:STARTMODE =” AlwaysRunning”
- 28. node.js/Https与快递
- 29. IIS快递缓存
- 30. Req.params不与快递
你的意思是[this](https://github.com/defunkt/dotjs)?你如何在Express中使用它?这是一个Chrome扩展... – tjameson 2013-04-21 16:16:50
他的意思是http://olado.github.io/doT/index.html – generalhenry 2013-04-21 16:22:30
看看降价的例子,你需要编写你的中间件那样的https://github.com/ visionmedia /快递/斑点/主/示例/降价/ index.js – generalhenry 2013-04-21 16:28:02