Conflict JavaScript templating
-
21-12-2019 - |
Question
I am writing project on Node.js + Express.js with templating Swig. On the user side using a template system doT.js
The question arose in the browser to pass a line like:
<h1> string {{= it.stringVar}} </ h1>
But I do not know how to make Swig not handle as part of the string variable (ie not handle braces).
Is there any mechanism to solve my problem?
Thanks in advance!
Solution
{% raw %}<h1> string {{= it.stringVar}} </ h1>{% endraw %}
Read more in swig docs.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow