Handlebars:
Template
{{#person}}
  {{firstname}} {{lastname}}
{{/person}}
Preparation-Script
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
    return "Helper '"+options.name+"' not found. " 
      + "Printing block: " + options.fn(context); 
});
Input
{
  person: {
    firstname: "Yehuda",
    lastname: "Katz",
  },
}
Output
Helper 'person' not found. Printing block:   Yehuda Katz
最后更新: 1/11/2020, 3:46:21 PM