Calling javascript function from pug
-
I'm new to jsreport and learning, just trying to call a javascript function from inside pug. It doesn't return any value.
The playground link is: https://playground.jsreport.net/w/anon/hO2vPngl
How is this done correctly?
The pug is:
h1 Address div.span #{cityStateZip}
The javascript is:
function cityStateZip() { return "Los Altos, CA 94022"; }
-
Please see the documentation
https://github.com/bjrmatos/jsreport-pugHelper can be found on
#{templateHelpers.cityStateZip()}
However, if you are new, probably first browse example with handlebars.