User1657665600 posted
For this scenario, made Jquery Ajax call , then only it will retrieve data are bind to UL.
function StrikeAppViewModel() {
var self = this;
self.Contacts = ko.observable($.parseJSON(localStorage["ContactsTable"]));
self.SearchContacts = function () {
$.ajax({
url: 'http://localhost:12345/api/Contact',
type: 'GET',
dataType: 'jsonp',
data: { ID: id },
context: this,
success: function (result) {
debugger;
self.Contacts(result);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
} };