What is the difference between snapping <! - ko & # 8594; and visible knockout binding?
2 answers
<!-- ko [binding] -->allows you to bind to a virtual element .
data-bind="[binding]" is a regular binding and can only be applied to actual elements.
The difference is that the first can be used without creating an element:
<ul>
<li class="heading">My heading</li>
<!-- ko foreach: items -->
<li data-bind="text: $data"></li>
<!-- /ko -->
</ul>
Note that not every binding handler can be applied to a virtual element:
, , Knockout, , API- ko.virtualElements.allowedBindings.
+4