/// /// /// /// class PersonViewModel { personList: PagedArray; constructor() { var self = this; self.personList = new PagedArray((pageIndex, pageSize, success, fail) => { $.ajax("/api/person", { cache: false, type: 'GET', data: { pageIndex: pageIndex, pageSize: pageSize } }).done(function (data) { success(data.Persons, data.TotalCount); }).fail(function (error) { alert('Error Occured'); }); }, 7); self.personList.load(null, null); } }