The goal
Make this possible:
<!-- ko foreach: { data: products, afterAdd: highlightIt } -->
<li>
[...]
</li>
<!-- /ko -->
The problem
The syntax is wrong. It seems to be possible only with data-bind
attribute, like this:
<ul data-bind="foreach: products, afterAdd: highlightIt">
<li>
[...]
</li>
</ul>
What is happening, eventually?
Nothing. Console displays no errors, but Knockout cannot work with the foreach because its do not know that comment is a foreach.
Someone have any idea?