Handlebars:
Template
helper: {{name}}
data: {{./name}} or {{this/name}} or {{this.name}}
Preparation-Script
Handlebars.registerHelper('name', function () {
    return "Nils"
})
Input
{ name: "Yehuda" }
Output
helper: Nils
data: Yehuda or Yehuda or Yehuda
最后更新: 2020/1/11 15:46:21