code fragment below is copy from mustache , but I can't get argument render in Lambdas. The console told me argument render is undefined. Is there something that i misunderstand?
Template:
{{#wrapped}}
{{name}} is awesome.
{{/wrapped}}
Hash:
{
"name": "Willy",
"wrapped": function() {
return function(text, render) { //actually param render cannot get a argument
return "" + render(text) + ""
}
}
}
code fragment below is copy from mustache , but I can't get argument render in Lambdas. The console told me argument render is undefined. Is there something that i misunderstand?
Template:
{{#wrapped}}
{{name}} is awesome.
{{/wrapped}}
Hash:
{
"name": "Willy",
"wrapped": function() {
return function(text, render) { //actually param render cannot get a argument
return "" + render(text) + ""
}
}
}