thymeleafjs
thymeleafjs copied to clipboard
A basic implementation of the Thymeleaf templating engine in JavaScript
 ```js const thymeleaf = require("thymeleaf"); const fs = require("fs"); const json = JSON.parse(fs.readFileSync("./demo.json", "utf8")); const templateEngine = new thymeleaf.TemplateEngine( thymeleaf.STANDARD_CONFIGURATION ); templateEngine .process(fs.readFileSync("./demo2.html", "utf8"), json) .then((result) => { console.log(result);...
th:block error : Element is not defined thymeleaf 0.15.0 code: engine.process('\ Surrounding element removed via synthetic block.' ....
I've greatly appreciated this implementation and being able to get to know Thymeleaf. Thank you so much! Noting the following as either a question; am I doing something wrong? or...
I didn't know your project existed so I have started to implement with ChatGPT a client side template engine based on thymeleaf syntax https://github.com/vricosti/thymeleafjs...
A list of the expression syntaxes currently supported in the latest version of ThymeleafJS. The full list of expression syntaxes was taken from the Thymeleaf docs here: https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#standard-expression-syntax ### Simple...
Thymeleaf support in line variables [https://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#inlining](https://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#inlining)
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...
Using the operators of the parser to build out the grammar can get quite long, eg: to code the standard variable expression syntax, I have to write this JavaScript: `Sequence(/\${/,...
# Code ```javascript const { TemplateEngine, STANDARD_CONFIGURATION } = require("thymeleaf"); const templateEngine = new TemplateEngine(STANDARD_CONFIGURATION); (async () => { const content1 = ''; const content2 = ''; const content3 =...
List taken from the Appendix section of the Using Thymeleaf docs: https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#appendix-a-expression-basic-objects ### Expression basic objects - [ ] #ctx - [ ] #locale - [ ] param - [...