It works everywhere else... I'm really not sure how to reason about this.
The code directly below does interpolate the checkedValue, but because there are " " around the checkedValue it keeps the box checked. But I cannot remove the quotation marks or it won't work.
extends layout
block content
h1.headLine= challenge.title
p Difficulty: #{challenge.difficulty} #{checkedValue} Points: #{challenge.points} //checkedValue interpolates to true or false
p= challenge.description
form(action="/submitChallenge" method="post")
label(for="challenge1") Mark as Solved!
input( type="checkbox" id="challenge" checked="#{checkedValue}" name="challenge" value="#{challenge._id}" )
p #{checkedValue} //interpolates here too, without any " "
button(type="submit") Submit
The following code just leaves the #{checkedValue} as is without any interpolation. So .. this doesn't work either, even though the #{challenge._id} works just fine!:
input( type="checkbox" id="challenge" "#{checkedValue}" name="challenge" value="#{challenge._id}" )
I've also tried removing the quotes.
Nothing seems to work. Currently the variable is a boolean value, but it doesn't really matter if I can't get it to interpolate!
I've thought about setting it to "checked" or "" for unchecked, but... I still need to get it interpolated.