knockout / knockout

Knockout makes it easier to create rich, responsive UIs with JavaScript
http://knockoutjs.com/
Other
10.47k stars 1.51k forks source link

SVG in components / custom elements #2027

Open modeler42 opened 8 years ago

modeler42 commented 8 years ago

SVG can be used in template-Bindings by using a custom templateEngine like described in https://groups.google.com/forum/#!topic/knockoutjs/P2WqnOtnTqo.

But using any of the suggested implementations does not seem to work with the internal AMD-loading of templates and the component-binding.

Are there any extension points to get these working within SVG-namespace?

mbest commented 8 years ago

The workaround is to wrap your template in an <svg> element.

modeler42 commented 8 years ago

Unfortunately the workaround still does not display the content of the template. It seems to be in the desired namespace (according to Chrome Dev-Tools), but the wrapping svg-Tag is copied with the template into the DOM by KnockOut:

`

... template content ... `