All expressions in FastplateJS are wrapped by !(
expression )
except for the end-block expression: !/
In fastplate you can do these things:
- Insert value into text:
!(path.to.value)
This is the json path to your value from the passed data object. It can also be the iterator variable when inside a loop. Or it can be a function. (this function must have been defined in the data object passed to thefastplate(text, data)
call).- If it is a function you can pass arguments after the initial function name. EG:
!(load body)
. - You can also pass variables that are in scope to the function by using
$
. EG:!(renderAsName $user.name big)
. In this case the actual user name will be passed as the first argument and the literal string"big"
will be passed as the second.
- If it is a function you can pass arguments after the initial function name. EG: