At the moment i’m using EJS template Engine but I need to convert it in Jade, could someone help me with this conversion?
<option<%- (page['frmContact']['subject'] == 'Informazioni generiche') ? ' selected="selected"' : '' %>>Informazioni generiche</option>
<option<%- (page['frmContact']['subject'] == 'Partnership') ? ' selected="selected"' : '' %>>Partnership</option>
<option<%- (page['frmContact']['subject'] == 'Corsi') ? ' selected="selected"' : '' %>>Corsi</option>
This is the closest I came up with, but you end up with an empty selected property if the conditional is false:
I’m not sure if this compiles, but this would be how you would not show the selected attribute at all if the condition was false: