handlebars myTemplate.handlebars -f handlebars-fullname.js -k fullname
The above step is optional. , your steering pattern would work even if you did not specify the name of the helper during pre-compilation, however the following code (which should basically contain all your helpers) needs to be inserted on the client side
Handlebars.registerHelper('fullname', function(person) { return person.firstName + " " + person.lastName; });
I tried this and it works like a charm!
Rajat sharma
source share