node.js - Lodash forEach function won't line break yeoman generator integration -
in yeoman generator's index.js file have code snippet
this.fs.copytpl( this.templatepath('/index2.html'), this.destinationpath('app/index2.html'), { title: [this.templatedata.test1, this.applicationname], h1: this.applicationname } );
i trying run lodash foreach statement in html file , won't line break no matter try.
<% _.foreach(title, function(title) { %><li><%- title %></li>\n<% }); %>
the result is:
<li>star wars!</li>\n<li>foundation5application</li>\n
what expect is
<li>star wars!</li> <li>foundation5application</li>
is there can correct foreach statement?
use actual line break:
<% _.foreach(title, function(title) { %><li><%- title %></li> <% }); %>