My underline pattern doesn't work in jade

Possible duplicate:
how to avoid <> in javascript underline pattern?

in the view i have a template

script(id='productTemplate',type='text/template') a(href="/edit?<%= id %>", class='products') <img src="<%= photo %>", alt="<%= name %>" /> p.product_name <%= name%> 

it works well, except that the href attribute of the anchor label does not display <% = id%>.

but when I put <% = id%> next to <% = name%>, it works, and when I put <% = name%>

in href = "<% = name%>" it will not be displayed again.

please help me.

0
source share

Source: https://habr.com/ru/post/925081/


All Articles