angular-ui/ng-grid — pull request #682 by chiefy (2013-09-03 15:55:50+00:00)
Title: Fix for #598.

When totalServerItems is updated, maxPages() wouldn't get evaluated until after the user changed the currentPage input, so maxPages() could be less than currentPage and Angular would change the currentPage to undefined (via it's max parser) which would result in badness.