I tried with this question to override template function globally using require function and it works well for templateSetting.
I tried to extend/override the _.template function to wrap div using below code. But getting with plain template not parsed template like this <%= title %>
define(['underscoreBase'], function(_) {
_.template = function(str){
return "<div class='test'>"+str+"</div>";
};
return _;
});
How do we acheive adding/wrap some HTML tag with _.template string content? Please advise.