This commit is contained in:
2020-09-07 22:41:56 +00:00
parent 6f42a1f801
commit 70bf9fa51c
3 changed files with 17 additions and 2 deletions

View File

@@ -409,7 +409,7 @@ namespace AyaNova.Biz
#endif
//compile and run handlebars template
var compileScript = $"Handlebars.compile(`{report.Template}`)({{ ayReportData:ayPreRender({ReportData}), ayClientMetaData:{clientMeta}, ayApiUrl:`{apiUrl}` }});";
var compileScript = $"Handlebars.compile(`{report.Template}`)({{ ayReportData:ayPreRender({ReportData}), ayClientMetaData:{clientMeta}, ayServerMetaData:{{ayApiUrl:`{apiUrl}`}} }});";
var resultHTML = await page.EvaluateExpressionAsync<string>(compileScript);
//render report as HTML