We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle tag <%- jsVariable %> where jsVariable is a string variable with several <%= %>
Usecase here:
<% for(var i = 0 ; i < largeObject.elementArray.length; ++i) {%> <%-largeObject.elementArray[i].myTemplate%> <%}%>
'.myTemplate' is a string variable - examples below:
largeObject.elementArray[i].myTemplate = '<%=largeObject.elementArray[i].variable_1 + largeObject.elementArray[i].variable_7 + largeObject.elementArray[i].variable_12%>'
or
largeObject.elementArray[i].myTemplate = '<%=largeObject.elementArray[i].variable_1 + largeObject.elementArray[i].variable_5 + largeObject.elementArray[i].variable_14%>'
'myTemplate' variable derivation is fairly complex and hence it is pre-calculated string - but then how do I expand 'myTemplate' string now.
My EJS knowledge is basic - I might be missing some technical correct terms explaining this problem.
The text was updated successfully, but these errors were encountered:
This version of EJS is no longer maintained. The current one, available on NPM, is here: https://github.com/mde/ejs
Please ask this question over there, so other folks can follow the discussion. Thanks.
Sorry, something went wrong.
No branches or pull requests
How to handle tag <%- jsVariable %> where jsVariable is a string variable with several <%= %>
Usecase here:
'.myTemplate' is a string variable - examples below:
largeObject.elementArray[i].myTemplate = '<%=largeObject.elementArray[i].variable_1 + largeObject.elementArray[i].variable_7 + largeObject.elementArray[i].variable_12%>'
or
largeObject.elementArray[i].myTemplate = '<%=largeObject.elementArray[i].variable_1 + largeObject.elementArray[i].variable_5 + largeObject.elementArray[i].variable_14%>'
'myTemplate' variable derivation is fairly complex and hence it is pre-calculated string - but then how do I expand 'myTemplate' string now.
My EJS knowledge is basic - I might be missing some technical correct terms explaining this problem.
The text was updated successfully, but these errors were encountered: