is it possible to use thymyleaf conditions for building javascript function ?
For example I have a flag specialClient which I will pass from java code to template render engine. So now I want to write something like followed code in my template:
...
<th:if=${specialClient}>
callbackForSpecialCLient()
<else>
plainCallbackWithAdForPoorClients
<endif>
...
which (after rendering) should result in:
...
callbackForSpectialClient()
...
As you can see we don't have any if conditions in rendered result. That's what I want so much to achieve.