javascript - Printing expression values inside comments in Jade template -


need print value of parameter inside jade template comment. value passed-in correctly; following works expected:

if type !== "surveyfree"     ul.polloptions         answer, idx in answers             li                 +printanswer(answer, idx) else     textarea(cols="50", rows="4", placeholder="type in answer") 

however, attempts print out value of type variable inside comment have failed. i've tried following forms:

// "type = " + type // #{"type = " + type} // span= #{"type = " + type} // span= type = #{type} 

and many others, nothing works (everything gets printed typed in). i'd output:

<!-- type = challenge --> 

or

<!-- type = survey --> 

all appreciated!

maybe way you:

!='<!-- comment varaible: ' + variable + '-->' 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -