Using conditional statements in docxtemplater
-
I am able to use doxtemplater to loop though data: eg:
{#array} Show this content {/array}
But I am unable to use conditional statements.
I did have a look at the documentation that was linked in the jsreport documentation: https://docxtemplater.readthedocs.io/en/latest/angular_parse.html
But it does not work. Eg:
{#array.length>1}
There are multiple users
{/}Will not work.
Am I supposed to install something else? Or make a change to the script/template?
-
https://github.com/jsreport/jsreport/issues/540
The docxtemplater recipe unfortunately doesn't support a custom parser.
We decided to focus rather on our docx recipe implementation.
Feel to fork the jsreport-docxtemplater repo and add what you need.