I am converting a project from jsRender to Knockout to try the native
templating system. I am trying to dynamically generate some code that will
be displayed in a pre block.
This only seems possible by either:
1. Constructing a computed observable for the contents of the pre, or:
2. Creating a template full of spans.
I have demonstrated both options here: http://jsfiddle.net/afSLH/5/
The example I have presented is greatly simplified but even in that case I
think the spans look quite messy. I would like to use a containerless text
binding as mentioned in the comments here:
It seems that this is the only reason that you might want to use an
external templating library like jsRender, so I was wondering if anyone had
investigated the containerless text binding any further? If not what is the
best way of integrating jsRender and Knockout at the moment?
Really enjoyed trying out Knockout!