handlebars.java icon indicating copy to clipboard operation
handlebars.java copied to clipboard

Feature: Naming dynamic helper objects

Open chrylis opened this issue 3 years ago • 0 comments

The ability to use registerDynamicHelper to map class methods onto helpers is extremely helpful, but currently the method name is used with no ability to customize, and all helper methods go into a global namespace. It would be useful to be able to specify a prefix like this:

hbs.registerHelpers("$math.", java.util.Math.class);

and then say

{{ $math.sin(degrees) }}

chrylis avatar Aug 04 '22 18:08 chrylis