Search code examples
javascriptknockout.jsko.observablearray

Knockout observableArray foreach doesn't work


I'm beginner in Knockout and I need some help here.

I sliced some part of my code, which I can't understand, why it doesn't work.

http://jsbin.com/ezuKume/1/edit?html,js,output


Solution

  • Here is an updated jsbin for you.

    You were doing a foreach on a <tr> element, but your data-bind was in a <div>. It should be either a <table> or a <tbody>