Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Created May 12, 2013 16:51
Show Gist options
  • Select an option

  • Save beyond-code-github/5564201 to your computer and use it in GitHub Desktop.

Select an option

Save beyond-code-github/5564201 to your computer and use it in GitHub Desktop.
Final version of the getData function
// Button click function
model.getData = function () {
var skip = model.pageSize() * (model.currentPage() - 1);
$.get("/api/values?$top=" + model.pageSize() + "&$skip=" + skip + "&$inlinecount=allpages", function (data) {
model.count(data.Count);
model.records(data.Results);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment