Reputation: 11599
What is the benefits of the Virtual Element described on this page of Knockout? How a Virtual Element is different from regular HTML element and where it is being used?
Upvotes: 1
Views: 2229
Reputation: 43899
http://knockoutjs.com/documentation/if-binding.html#note-using-if-without-a-container-element
In this case, you can’t put if on the
<ul>
(because then it would affect the first<li>
too), and you can’t put any other container around the second<li>
(because HTML doesn’t allow extra containers within<ul>
s).
Upvotes: 2