Put Jade local variable in tag attribute

teerapap picture teerapap · Feb 22, 2011 · Viewed 20.7k times · Source

I want to put Jade variable in tag attribute but it isn't evaluated.

a(href="/logout/#{user.name}")

Answer

Carlosedp picture Carlosedp · Feb 22, 2011

You could use:

a(href='/logout/'+user.name)