Basic Templating
Pre-release
Pre-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).