Literal Expression
Specify a JavaScript primitive type.
"string" | 'string'
Specifies a string.
{{myHelper( "this is a string" )}}
\-[0-9]+\.?[0-9]*
Specifies a number.
{{myHelper( 5.2 )}}
null | undefined | true | false
Specifies a JavaScript null
, undefined
, true
, or false
value.
{{myHelper( false )}}
Use
Literal expressions are usually passed as arguments to Call Expression or Helper Expressions like:
{{task.filter("completed", true)}}
{{pluralize "dog" 2}}