{{#is expr1 expr2}}
can.stache.helpers.is
{{#is expr...}}BLOCK{{/is}}
Renders the BLOCK
template within the current template.
Parameters
-
expr
{can.stache.expression}
Optional VariableAn expression or key that references a value within the current or parent
-
BLOCK
{can.stache(template)}
A template that is rendered if the result of comparsion
expr1
andexpr2
value is truthy.
Returns
{DocumentFragment}
If the key's value is truthy, the BLOCK
is rendered with the
current context and its value is returned; otherwise, an empty string.
The
is
helper compares expr1 and expr2 and renders the blocks accordingly.