knockout.js using $index with if binding

$index is an observable, and observables are functions. When you use observables in an expression you must use the () form to access the value.

<!-- ko if: $index() === 0 -->

Leave a Comment