I'm new to Knockout.js and I think it is only matter of finding the right syntax.
I want to use the looped variable of a foreach binding to create a component. Something like this:
<ul data-bind="foreach: packages">
<li>
<my-widget params='package'></my-widget>
<!-- I have tried but dont' work:
<my-widget params='this'></my-widget>
<my-widget params='$parent'></my-widget>
<my-widget params='$parenteContext'></my-widget>
-->
</li>
</ul>
Is there an easy way? Can with binding can be useful?
EDIT:
Here is a simple jsfiddle to demonstrate it: http://jsfiddle.net/n194o9dp/3/
I'm expecting to see a ul list with a repetition:
- a a
- b b
- c c