JavaScript Not Running Inside Template

Hello All,

I am trying to run a javascript inside a template , passing it as an input to the service,

pub.report:runStringTemplateOnPipe

The javascript is not working properly. But when I am running it as a stand alone HTML page, it is running properly. The script is shown below,

The $template value which I am pasing input to the service is,

HTML>

Please let me know if I can run a javascript through a template on pipe.

Thanks and Regards
Abir Banerjee

This is not an issue.