admin管理员组文章数量:1026989
Using Handlebar/Mustache, I would like to show the Address as follows (with the new lines):
{{FirstName}}{{LastName}}
{{Address1}}{{Address2}}
{{City}}
{{State}}
{{Zip}}
But the above is always rendered in one line. I tried using \n but it doesn't work. Is it possible to handle new line (\n) in the template?
Using Handlebar/Mustache, I would like to show the Address as follows (with the new lines):
{{FirstName}}{{LastName}}
{{Address1}}{{Address2}}
{{City}}
{{State}}
{{Zip}}
But the above is always rendered in one line. I tried using \n but it doesn't work. Is it possible to handle new line (\n) in the template?
Share Improve this question asked Oct 19, 2012 at 14:52 dotNetNewbiedotNetNewbie 7994 gold badges17 silver badges35 bronze badges1 Answer
Reset to default 4Add HTML line breaks to your template:
{{FirstName}}{{LastName}}<br/>
{{Address1}}{{Address2}}<br/>
{{City}}<br/>
{{State}}<br/>
{{Zip}}
Using Handlebar/Mustache, I would like to show the Address as follows (with the new lines):
{{FirstName}}{{LastName}}
{{Address1}}{{Address2}}
{{City}}
{{State}}
{{Zip}}
But the above is always rendered in one line. I tried using \n but it doesn't work. Is it possible to handle new line (\n) in the template?
Using Handlebar/Mustache, I would like to show the Address as follows (with the new lines):
{{FirstName}}{{LastName}}
{{Address1}}{{Address2}}
{{City}}
{{State}}
{{Zip}}
But the above is always rendered in one line. I tried using \n but it doesn't work. Is it possible to handle new line (\n) in the template?
Share Improve this question asked Oct 19, 2012 at 14:52 dotNetNewbiedotNetNewbie 7994 gold badges17 silver badges35 bronze badges1 Answer
Reset to default 4Add HTML line breaks to your template:
{{FirstName}}{{LastName}}<br/>
{{Address1}}{{Address2}}<br/>
{{City}}<br/>
{{State}}<br/>
{{Zip}}
本文标签: javascriptNew line in handlebar templatesStack Overflow
版权声明:本文标题:javascript - New line in handlebar templates - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745503659a2153506.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论