title: Angular pagination - update data onclick
body: <p>I'm attempting to implement pagination on a angular/bootstrap site. I have the data showing with the correct # of per-page rows, I have the angular paging showing the right number of pages...but heck if I can find anywhere that tells me HOW to use the paging to refresh my data when a page # is clicked...?! {{currentPage}} is updating, but not sure how to have it call getPresentations to update the list.</p>
  
  <pre><code>&lt;div&gt;
          {{noOfPages}} &amp;nbsp; {{currentPage}} &amp;nbsp; {{maxSize}}
          &lt;pagination num-pages="noOfPages" current-page="currentPage"&gt;&lt;/pagination&gt;
      &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      angular.module('app', ['ui', 'shared', 'ui.bootstrap']).controller('AppCtl', function ($scope, $http, $window) {
          var mvc = $window.MVC;
          $scope.noOfPages = 0;
          $scope.currentPage = 1;
          $scope.maxSize = 5;
  
          $scope.getPresentations = function () {
              $http.get(mvc.base + "API/Presentations?page=" + $scope.currentPage + "&amp;itemsPerPage=10")
                 .success(function (result) {
                     $scope.presentations = result.Items;
                     $scope.noOfPages = result.TotalPages;
                     $scope.currentPage = result.Page;
                 })
                  .error(function (result, status) {
                      $scope.newModal.errors = mvc.getApiErrors(status, result);
                  });
          };
  
          $scope.getPresentations();
      });
  &lt;/script&gt;
  </code></pre>