Handlebars:
Template
{{#each people as |person|}}
  {{#> childEntry}}
    {{person.firstname}}
  {{/childEntry}}
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  people: [
    { firstname: "Nils" },
    { firstname: "Yehuda" },
    { firstname: "Carl" },
  ],
}
Output
    Nils
    Yehuda
    Carl
最后更新: 2020/2/25 16:23:24