Skip to content

Basic Templating

Pre-release
Pre-release
Compare
Choose a tag to compare
@CMEONE CMEONE released this 07 Mar 06:34
· 52 commits to main since this release

tApp now supports template files. Through the renderTemplate(path, options) and renderTemplateHTML(html, options) render functions, an object of options can be passed for rendering. Variables can be stored in the template as {{ varName }} (spaces optional), and in options, {varName: value}. Templates also support nested variables ({{ varName.nested1.nested2 }} in template and {varName: {nested1: {nested2: value}}} in options) and arrays ({{ varName.0 }} in template and {varName: [values]} in options).