Open partynikko opened 7 years ago
Need to edit code of view template.
//View Template
var templateSettings = {
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
};
Set it to
var templateSettings = {
evaluate : /{{([\s\S]+?)}}/g,
interpolate : /{{=([\s\S]+?)}}/g,
escape : /{{-([\s\S]+?)}}/g
};
@jiren Thank you for your reply. However I don't feel like I'd like to change the code in the library in case of future updates. Do you have any plan on implementing a function for setting the hooks/syntax?
Eager to use this plugin together with ASP.NET Web Forms, there's an issue where the view syntax
<%= var %>
won't work as it shares the syntax with ASP.NET Web Forms and thus it's not possible to write the view HTML in the ASP.NET project.In Underscore.js you can define your own template settings and thus change the syntax to make it work with ASP.NET.
How do you recommend us to work around this?
Thanks & Best Regards