Change totalPages watcher to avoid resetting page number before data loa...

...ds

If data is being loaded asyncronously but the page number is already known then pagination will update page number to 1 initially before ajax data comes back, and it will stay on page 1 instead of the page originally intended.

e.g. if $scope.currentPage = 2; then <pagination ng-model="currentPage" ng-change="changed"  ....  ></pagination> will update $scope.currentPage to 1 when the view loads initially (no data = 1 page) and fire the change handler, putting the user back on page 1.