Concatenating a variable + string in Jade file

use #{} notation if you want to interpolate a variable in the contents of an element. you can just use the variable names straight up if you want to use them in attributes.

link(rel="stylesheet", href="" + pref + '.css')


link(rel="stylesheet", href="" + locals.pref + '.css')

when to use #{}:

a(href="" + locals.pref + '.css') View the stylesheet at #{pref}

Leave a Comment