Closed jyasskin closed 10 years ago
this is working as designed. The ref attribute allows you to specify another template's content to use in place of the any content provided inline. It will ignore any directives on the referenced template.
Could I ask you to double-check that the current design is a good idea? :)
Done. =-)
<template id="foo" if="{{bar}}">
seems not to apply theif
when the template isref
ferred to by another template.Given the file:
I get output HTML that looks like:
Because the template with
id="t"
usesif="{{ items }}"
, I had expected the<ul>
insideEgypt
to be dropped.To fix this, I need to write:
instead. Using
<template bind id="t" if="{{ items }}">
didn't make theif
take effect. If I drop thebind
, the template doesn't get expanded at all, which makes some sense. Dropping thebind
on theref="t"
template breaks the recursion, which surprised me since bothif
andrepeat
work without it. Using:works, but the
if
is duplicated.