I’m trying to show some mark up based on the value of $index, I can display the value but I can’t seem to use it with an if binding, what’s the best approach here?
<!-- ko if: $index===0 -->
<div>some mark up here</div>
<!-- /ko -->
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
$index is an observable, and observables are functions. When you use observables in an expression you must use the () form to access the value.