Express 在注释内插入变量

Express 在注释内插入变量,express,pug,Express,Pug,我试图在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

我试图在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-->


是否可以在jade/pug注释中插入字符串?

您需要使用HTML注释:

这么简单:-)谢谢!