props object to transform(); your template reads those values with {props.*} expressions. Tag plugins can introduce additional scoped variables (for example, <ForEach> gives you the loop iterand).
Accessing variables
Dot notation
Read nested properties with dot notation, same as JavaScript:Bracket syntax
Bracket syntax works for dynamic or hyphenated keys:Undefined-variable behavior
Nothing in this path throws, so a typo degrades silently. The two cases degrade differently:- Missing nested properties (anything after a
.or[...]) render as an empty string: - Bare unknown identifiers (no
props.prefix) resolve toundefinedand render the literal stringundefinedinto your output:
props, introduced by a tag plugin’s scope (such as the <ForEach> iterand), or registered filters (see Filters) are accessible. JavaScript globals aren’t.
Examples
Defined variable
Nested properties
Bracket syntax for dynamic properties
Undefined nested property
Undefined bare identifier
undefined; the caller passed props.username, but the expression forgot the prefix)