googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 61 forks source link

Would like to instantiate element types based on binding #159

Closed shans closed 10 years ago

shans commented 10 years ago

I want to maintain a visual display of a collection of custom elements (the intention is that these elements are draggable into a sandbox). I'd like to control which elements should be used via a bound property, e.g.:

<ul>
<template repeat={{e in elements}}>
<li><{{e}}></{{e}}></li>
</template>
</ul>

It'd be awesome if this worked :)

jmesserly commented 10 years ago

I don't think we could ever support this, because <template> needs to have valid HTML as its children. You may be able to create that effect with something like https://github.com/Juicy/juicy-html though.

fyi to @rafaelw tho