我想在多个div中使用 ng-repeat 范围值。我在单页上使用分页作为一个重复范围。
这是我的代码
<div>
<div align="left">
<button ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1"></button>
</div>
<div ng-repeat="projects in allProjects | startFrom:currentPage*pageSize | limitTo:pageSize" >
<h2 class="text-light" ng-show="allProjects.length">
{{projects.projectName}}
</h2>
</div>
<div align="right">
<button ng-disabled="currentPage >= allProjects.length/pageSize - 1" ng-click="currentPage=currentPage+1"></button>
</div>
</div>
<div class="row chart-size" ng-repeat="projects in allProjects | startFrom:currentPage*pageSize | limitTo:pageSize">
//chart
</div>
<div ng-repeat="projects in allProjects | startFrom:currentPage*pageSize | limitTo:pageSize" >
<h2 class="text-light" align="center" ng-show="allProjects.length">
<font color="red" >{{projects.overAll}}%</font>
</h2>
</div>
我的页面限制是1.这对我来说很好。但不确定这是否是正确的解决方案。如何正确使用这种情况。