If I generate an array in JavaScript, is it possible to configure a Freemarker template in the JavaScript code, in order to generate html which dynamically displays the array's elements?
2 Answers
freemarker can display javascript.
function doSomeThing(){
<#if !user??>
location.href="www.xxx.com/login.htm"
</#if>
other js
}
if you want to create dynamically js depend by the some arg you can use macro to define yourself function. to show some different js code snippet by the input arg.