what is the difference between <!--ko--> binding and visible binding in knockout?
问题 ko <!--ko--> binding and data-bind="visible:sometext" binding Both binding did the same operation and which one is efficient for use and which one is best 回答1: <!-- ko [binding] --> allows you to bind to an 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 having to create an element: <ul> <li class="heading">My heading</li> <!-- ko foreach: items --> <li data-bind="text: $data"></li> <!