I am going through a tutorial that uses html for its view engine, I am working on jade and just wanted to know what this would become in a jade page.
<%=firstName%>
I tried this but it tells me that the everything inside the brackets are undefined, even though the userTemplate id is being called in the main.js file.
script(src='/js/main.js', type='text/javascript')
script(id='userTemplate', type='text/template')
#{firstName}#{lastName}#{email}#{phone}#{birthday}#{city}
<%= is for a javascript template mostly likely Underscore. The problem is Jade is interpreting your javascript template as Jade. I believe you just need to add a | to the beginning of the line and Jade will directly output that line without interpreting it.
script(id='userTemplate', type='text/template')
| <%= firstName %> <%= lastName %>
Alternatively I believe you can add a . after the script line and it does the same thing.
script(id='userTemplate', type='text/template').
<%= firstName %> <%= lastName %>
Check out the documentation under Tag Text for more information about it.