Skip to content Skip to sidebar Skip to footer

How To Escape <> In Javascript Underscore Template?

when using underscore template i want to interpolate a value in anchor's href attribute like a(href= '<%= id %>', class='products') //underscore template in jade but the out

Solution 1:

Use != instead of = to unescape.

In your case:

a.products(href!="<%= id %>")

Post a Comment for "How To Escape <> In Javascript Underscore Template?"