I am currently constructing a webpage using knockout 3.0. My goal is to implement a Bootstrap list with badges, as shown in the example and code below
However, when I try to achieve this within the knockout template binding like so
<script type="text/html" id="document-template">
<li class="list-group-item" data-bind="text: Caption">
<span class="badge" data-bind="text:PageCount"></span>
</li>
</script>
the page displays the content without the span element
If I move the span tag outside the li element like this
<script type="text/html" id="document-template">
<li class="list-group-item" data-bind="text: Caption"></li>
<span class="badge" data-bind="text:PageCount"></span>
</script>
Now I can see my desired span text - even though the styling may not be correct
My question is: 1) does knockout have an issue with one tag nested inside another? Or 2) did I make an error in my implementation? If it's the latter, could you provide some guidance?
Thank you