在评论中插入变量
问题描述:
我试图在html评论中写入循环变量的值,但我只在我的评论中获得原始文本。在评论中插入变量
内模板:
div This is a simple div
- for itervalue in names
label
//This is a html comment for item #{itervalue} sent to client
input(type='radio', name='item_name', value=itervalue)
span item : #{itervalue}
br
结果的注释行:
<!--This is a html comment for item #{itervalue} sent to client-->
是否可以插玉/哈巴狗评论里面串?
答
您需要使用HTML注释:
<!-- This is a html comment for item #{itervalue} sent to client -->
这么简单:-)谢谢! – Seki