I got several pages (Mvc partial views) to load to a content div
.
$.ajax({
url: '/Edit/'+tab,
dataType: 'html',
success: function (data) {
$('#tab').html(data);
}
});
Of course there is a div in Html:
<div id="tab"></div>
The partial view can be successfully loaded into the tab div. But the partial views have their own knockout viewmodels. The binding is lost when loaded ajaxly.
So what is the correct way to load a page as well as its knockout binding?