How to execute js with Jade?

心已入冬 提交于 2019-12-05 20:19:08

The following both work for me:

- var test = Math.sqrt(16);
  div #{test}

or

div #{Math.sqrt(25)}

If possible, would you please post your somejs()? Are you certain that it is producing a HTML string?

To use express-messages with jade use this code in your template:

- var m = messages()
!= m

In jade simply use - someJS() for more example see the jade website and the in the readme

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!