How to set Paging in AngularJS

Html File
  1. <pagination style="margin-left: 850px;" total-items="totalItems" items-per-page="itemsPerPage"  
  2. ng-model="currentPage" ng-change="pageChanged()" class="pagination-sm" boundary-links="true"  
  3. previous-text="‹" next-text="›" first-text="«" last-text="»"></pagination>  
  4.   
  5. <p ng-hide="true">  
  6.     total Items: {{totalItems}}  
  7.     <br />  
  8.     Items per page: {{itemsPerPage}}  
  9.     <br />  
  10.     Current Page: {{currentPage}}  
  11. </p>  
P is hide in this code if you show then ng-hide="false"
 
JS File
  1. $scope.itemsPerPage = 3  
  2. $scope.currentPage = 1;  
  3. $scope.maxSize = 5;  
  4. $scope.bigTotalItems = 175;  
  5. $scope.bigCurrentPage = 1;  
  6. $scope.pageCount = function() {  
  7.     return Math.ceil($scope.users.length / $scope.itemsPerPage);  
  8. };  
  9.   
  10. $scope.$watch('currentPage + itemsPerPage'function() {  
  11.     var begin = (($scope.currentPage - 1) * $scope.itemsPerPage),  
  12.         end = begin + $scope.itemsPerPage;  
  13.     $scope.users = usersa.slice(begin, end);  
  14. });  
  15. });  
$scope.users  is array