Mapping: foreach binding work only the first time
问题 I have the following snippet JQuery inside an HTML file: $.getJSON("/events/", function (data) { viewModel = ko.mapping.fromJS(data); ko.applyBindings(viewModel); }); The code is executed when, for example, the user presses a button and returns JSON like: {"Events":[{"Name":"Event1"},{"Name":"Event2"},{"Name":"Event3"}]} This result is linked (using KnockoutJS ) to: <ul data-bind="foreach: Events"> <li><span data-bind="text: Name"></span></li> </ul> Everything works fine with the first call