can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
25 lines (16 loc) • 729 B
Markdown
12
`{{#is expr...}}BLOCK{{/is}}`
Renders the `BLOCK` template within the current template.
{can.stache.expression} [expr...] An expression or key that references a value within the current or parent
{can.stache} BLOCK A template that is rendered
if the result of comparsion `expr1` and `expr2` value is truthy.
{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.
{{#is expr1 expr2}}
// truthy
{{else}}
// falsey
{{/is}}
can.stache.helpers.is {{#is expr1 expr2}}
can.stache.htags