Closed GoogleCodeExporter closed 9 years ago
The compiler needs to know the targets of all calls at compile time. So this
feature will not happen.
Original comment by kai.hu...@gmail.com
on 19 Aug 2011 at 8:58
Charles, if you need to compile templates only to JavaScript than you can
define a custom JS function that will accept reference to template as parameter.
Example:
// Expects param 'func' to be a function.
tmpl.util.callFunction = function (opt_data) {
return opt_data.func.call(null, opt_data);
};
Usage:
{call tmpl.util.callFunction}
{param func: $item.templateFunction /}
{param item: $item /}
{/call}
Original comment by alex.tra...@gmail.com
on 6 Jul 2012 at 3:42
The deltemplate feature is available.
Doc:
https://developers.google.com/closure/templates/docs/commands#delegates-with-var
iant
Original comment by viktor.m...@gmail.com
on 23 Oct 2013 at 5:35
deltemplate solves the issue both at JS and Java ends, but is it correct usage
to have template name same always?
Original comment by divya.p...@gmail.com
on 17 Sep 2014 at 8:23
Original issue reported on code.google.com by
charlesg...@optusnet.com.au
on 19 Aug 2011 at 7:27