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
Post a Comment