html-component icon indicating copy to clipboard operation
html-component copied to clipboard

[Question] Why couple mustache ?

Open bogas04 opened this issue 8 years ago • 3 comments

I think it'll be better to let users work out their data-binding (querySelector + templateStrings, mustache, etc) instead of forcing mustache.

bogas04 avatar Nov 14 '16 09:11 bogas04

Adding mustache was a simple way of working with single file components, since the template tag doesn't have any built-in data-binding method. It is possible to use something else, like template strings for example, by simply overriding the template method on the component class. I'll change the README to better reflect that.

felipeccastro avatar Nov 14 '16 13:11 felipeccastro

Makes sense. I think what you can do is create a separate module html-component-mustache-addon and makes necessary bindings so that users don't end up downloading code that they won't use.

bogas04 avatar Nov 15 '16 03:11 bogas04

Would be cool to see jsx support as this can be strongly typed in typescript.

https://youtu.be/6wEVu_mkJjM?t=29m24s

image image

ichpuchtli avatar Nov 15 '16 04:11 ichpuchtli