Handlebars:
Template
{{#each people}}
    {{../prefix}} {{firstname}} 
{{/each}}
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
{
  people: [
    { firstname: "Nils" },
    { firstname: "Yehuda" },
  ],
  prefix: "Hello",
}
Output
    Hello Nils 
    Hello Yehuda 
最后更新: 1/11/2020, 3:46:21 PM