title: angularJS pagination not reading current page number
body: <p>I am trying to implement <a href="https://angular-ui.github.io/bootstrap/#/pagination" rel="nofollow">ui.bootstrap.pagination</a> in my angularJS project, but I cannot seem to read the current page number, even though I have set ng-model. I am using  angular-ui-bootstrap version 0.13.3.</p>
  
  <p>The relevant part of my html:</p>
  
  <pre><code>    &lt;pagination 
        data-ng-model="currentPage" 
        data-ng-change = "paginate()"
        data-total-items="repositories.total_count" 
        data-items-per-page="numPerPage" 
        data-max-size="maxSize" 
        data-boundary-links="true" &gt;
      &lt;/pagination&gt;
  </code></pre>
  
  <p>And my code:</p>
  
  <pre><code>angular.module('myApp.repositories')
  .controller('RepositoryController', ['$scope', function($scope) {
    $scope.repositories = {};
    $scope.currentPage = 1;
    $scope.numPerPage = 30; // Number of items per page, set by Github API
    $scope.maxSize = 10; // Number of pages to show in pagination
  
    $scope.paginate = function() {    
      $http.get('https://api.github.com/search/repositories/', { 
        params: {
          q: 'twitter',
          page: $scope.currentPage
        }
      })
      .then(function(response){
          if(response.data){
              $scope.repositories = response.data;
          }
      });
    };
  }]);
  </code></pre>
  
  <p>The pagination shows as expected and I can use it without it throwing errors, but in my paginate() function $scope.currentPage always reads 1.</p>
  
  <p>I could be missing or overlooking something very basic, but I cannot seem to figure out why it isn't working.</p>