javascript – 如何使用AgnularJS更改Bootstrap UI分页中的文本和样式?

我不知道如何在这里更改样式和默认文本.

这里是html:

 <pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" rotate="false" num-pages="numPages" items-per-page="itemsPerPage"></pagination>

这里是JS:

  $scope.totalItems = $scope.data.length;
  $scope.totalItems = $scope.data.length;
  $scope.currentPage = 4;
  $scope.itemsPerPage = $scope.viewby;
  $scope.maxSize = 5;

最佳答案 要更改颜色,您可以使用CSS.

CSS:

ul.pagination li > a { color: red !important; }

要更改文本,您可以使用UI-Bootstrap的属性.

HTML:

<pagination first-text="Hello" previous-text="World" next-text="Good" 
 last-text="Day!"  total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" rotate="false" num-pages="numPages" items-per-page="itemsPerPage"></pagination>

Plunkr Demo

点赞