Handlebars:
Template
<ul class="people_list">
  {{#each people}}
    <li>{{this}}</li>
  {{/each}}
</ul>
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  people: [
    "Yehuda Katz",
    "Alan Johnson",
    "Charles Jolley",
  ],
}
Output
<ul class="people_list">
    <li>Yehuda Katz</li>
    <li>Alan Johnson</li>
    <li>Charles Jolley</li>
</ul>
마지막 업데이트: 2024. 6. 5. 오후 11:37:24