You can use the if binding to determine whether or not the child elements of the node should be created.
<div class="product-info">
<h2> Product1 </h2>
<img src="../products/product1.jpg"/>
<span data-bind="if:featured">
...
Similar to repeaters used in other languages. This binding will allow you to replicate a block of html for each item in an array.
<div data-bind="foreach:contacts">
<div class="contact">
<h2 data-bind="text:name">
<p data-bin...
The with binding binds the HTML inside the bound node to a separate context:
<div data-bind="with: subViewModel">
<p data-bind="text: title"></p>
</div>
The with binding may also be used without a container element where a container element may n...
The visible binding will hide an element by applying style="display: none;" to it when the binding evaluate as falsey.
<input type="text" data-bind="textInput: name"> <span class="error" data-bind="visible: isInvalid">Required!</span&...