Reputation: 839
I'm currently in the process of converting an application into Knockout. Currently there are a number of views that within them will loop round a list of objects within the model to then pass to a partialview to render that object.
<div>
foreach (var item in Model.ListData) {
Html.RenderPartial("~/Views/Shared/_ListPanel.cshtml", item);
}
}
</div>
In my knockout view model I have the same list of objects as an observable array. What would be the best way to pass each of them to the parital view and bind using knockout?
Upvotes: 0
Views: 441