Html 对angular js中的表应用分页,其中map是i';我在重复一遍
我在遍历键和值对所在的映射,我不知道如何对直接从数据库生成的映射数据应用分页。我在遍历键和值对所在的映射,我不知道如何对从数据库生成的映射数据应用分页直接的Html 对angular js中的表应用分页,其中map是i';我在重复一遍,html,angularjs,hibernate,pagination,Html,Angularjs,Hibernate,Pagination,我在遍历键和值对所在的映射,我不知道如何对直接从数据库生成的映射数据应用分页。我在遍历键和值对所在的映射,我不知道如何对从数据库生成的映射数据应用分页直接的 <table> <thead></thead> <tbody> <tr> <td><marquee>
<table>
<thead></thead>
<tbody>
<tr>
<td><marquee>
<h3>
A tag is a keyword or label that categorizes your question with
other, similar questions. Using the right tags makes it easier
for others to find and answer your question.
</h4>
</marquee>
<hr></td>
</tr>
<tr ng-repeat="(key,value) in tagForm.data track by $index">
<td align="left">
<div ng-init='tagForm.getTag(key)'
class=" w3-container w3-card w3-white w3-margin w3-round "
style="padding-left: 40px; padding-right: 40px;">
<br>
<p ng-repeat="data2 in tagForm.message track by $index">
<a ng-click="tagForm.getAnswer(key)">Q. {{value}}</a> <span
class="badge">{{data2}}</span> <br>
</p>
<ul ng-repeat="(key2,value2) in tagForm.ans track by $index">
<li><b ng-if="key==key2">Ans. {{value2}}</b></li>
</ul>
<div ng-init='tagForm.getUser(key)'>
<b>Posted
by:{{tagForm.user2[$index]}}</b>
</div>
<button class="btn btn-default" id="{{$index}}"
ng-click="count1=count1+1" ng-init="count1=5+($index*3)-5">
Upvote <span class="badge">{{count1}}</span>
</button>
<button class="btn btn-default" id="{{$index}}"
ng-click="count=count+1" ng-init="count=1+($index*2)">
Downvote<span class="badge">{{count}}</span>
</button>
<button class="btn btn-default" ng-click="gotoanswer()">Answer
this question</button>
<br> <br />
</div> <br>
</td>
<td height=100px><br /></td>
</tr>
</tbody>
</table>
标记是一个关键字或标签,它使用
其他类似的问题。使用正确的标签可以使它更容易
让其他人找到并回答你的问题。
Q.{{value}{{data2}}
- 答案{{value2}
张贴
发件人:{{tagForm.user2[$index]}
向上投票{{count1}
下一票{count}
答复
这个问题
在html文件中使用以下分页
<uib-pagination ng-show="isPaginate == false "
total-items="totalItems" ng-model="currentPage"
boundary-links="true" items-per-page="numPerPage"
class="pagination-sm" ng-change="pageChanged()" max-size="5">
</uib-pagination>
有关动态加载记录(以批方式加载记录,而不是一次加载所有记录)的信息,请参阅以下函数
$scope.pageChanged = function() {
// if($scope.currentPage!=1)
$scope.isCollapsed = false;
$scope.isRCollapsed = false;
$scope.page = ($scope.currentPage - 1) * $scope.numPerPage;
callApi($scope.page);//get next set of 10 records
console.log('Page changed to: ' + $scope.currentPage);
};
$scope.pageChanged = function() {
// if($scope.currentPage!=1)
$scope.isCollapsed = false;
$scope.isRCollapsed = false;
$scope.page = ($scope.currentPage - 1) * $scope.numPerPage;
callApi($scope.page);//get next set of 10 records
console.log('Page changed to: ' + $scope.currentPage);
};