Handlebars:
Template
{{#each paragraphs}}
<p>{{this}}</p>
{{else}}
<p class="empty">No content</p>
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{}
Output
<p class="empty">No content</p>
最后更新: 1/11/2020, 3:46:21 PM