I can't figure it out how I can get the HTML to process the extension/caller (scriptlets) that look like this <?= var data = getData()?>
. Here is my script code link.
Please check out my error:
I can't figure it out how I can get the HTML to process the extension/caller (scriptlets) that look like this <?= var data = getData()?>
. Here is my script code link.
Please check out my error:
From my answer here:
If you have the <?...?>
scriptlets in your HTML file when you evaluate with the HTMLService you need to use createTemplateFromFile()
otherwise they will be treated as plain text. The createHTMLOutputFromFile()
won't work for evaluating the script tags.
function doGet() {
return HtmlService.createTemplateFromFile('Index').evaluate();
}
You should take a look at the HTMLService best practices for async loading.