I have a simple template:
<div class='welcome'>Welcome <%- first_name %>!</div>
However my variable first_name is not rendered. This works fine:
<div class='welcome'>Welcome <%= first_name %>!</div>
and this correctly logs the variable:
<div class='welcome'>Welcome <%- first_name %><% console.log(first_name);console.log(typeof(first_name)); %>!</div>
which is of type string as expected. I couldn't find anyone with the same problem in the community. Is there something obvious I'm missing?
For context, this is used in a Marionette app that takes care of displaying the template.
_.templateSettings{evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g}It seems to be the same than inunderscoresource code.requirejs-tpl. Thanks for pointing me to the right direction!