-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I have problem accessing the data in the def function.
Just for an example, I have a data of
{"name":"Jake","age":31}
And here's a template file
{{##def.test = function(str) {
return "My name is: " + str;
}
#}}
{{#def.test(name)}}
As I tested the result will print out "My name is:" instead of "My name is Jake".
Is there a way to passing data to def function?
something like this???:
{{#def.test("{{=it.name}}")}}
or
{{#def.test(it.name)}}
Metadata
Metadata
Assignees
Labels
No labels