thymeleafjs
thymeleafjs copied to clipboard
th:if fails to parse equality against a literal string
Hello
Can't parse th:if="${value=='a string'}"
Steps to reproduce :
- Go to test/standard/processors/IfAttributeProcessor.js and run the test named "Renders the element and children if the expression is truthy" --> Success
- Change
let expression = '${value}'intolet expression = '${value==\'str\'}' - Few lines below, in the test data, change
value: trueintovalue: 'str' - Run the test --> Error: Failed to parse "${value=='str'}"
Regards
Note that an alternative syntax like th:if="${value}=='a string'" (ie test condition outside of brackets) works fine