I've been using plunker for about a month now. I was making a backbonejs plunker and I see that Underscore loses my template settings and falls back to ERB style templating whereas I would like the Mustache style syntax {{ myData }}
. I am setting the value in my app.js (which I always do in my apps) but for some reason, it keeps changing back to ERB <%=boo%>
. Can someone help me get my template setting straightened out?
plunker using underscore templating you'll need to view the console output in chrome dev tools or firebug or equiv...
Thanks for any tips or tricks. I tried
_.templateSettings = {
interpolate: /\{\{(.+?)\}\}/g,
evaluate: /\[\[(.+?)\]\]/g
};
when I console.log(_.templateSettings)
in my app.js file right after setting, everything seems correct, but my templates aren't being processed. I can break inside a view and run the same console.log() and I see it has been switched back to ERB style. Does anyone know how to make my settings stick? Perhaps it's a plunker issue because I have used this method many times without a problem.
which usually does the trick. I even try... window._ = _;
Thanks for any help, tips, tricks, etc...