googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 56 forks source link

Should template create instances for undefined values #104

Closed rafaelw closed 11 years ago

rafaelw commented 11 years ago

e.g. <template repeat> bound to [undefined, undefined, undefined].

Right now, the semantics are that an instance is created regardless of the model value.

I'm asking mainly because the behavior of <template bind> still troubles me a bit. In particular, with a <template bind>, assigning any value (even undefined) to template.model creates an instance, and there's no way to tell the template element to remove it.

arv commented 11 years ago

I think a more important question is what should happen when you iterator over [0, 1, undefined, 3]. I expect 4 items.

I'm asking mainly because the behavior of