[英]Angular UI Bootstrap Pagination buttons are not clickable
I am having a problem with my UI Pagination, The Pagination loads on my page but none of the buttons are clickable. 我的UI分页有问题,分页会加载到我的页面上,但是所有按钮都无法单击。 Has anyone had this problem?
有人遇到过这个问题吗? Here is my code.
这是我的代码。
<div class="rs-agency">
<!-- Real estate agency details -->
<div class="agency-item" ng-repeat="Review in Reviews.slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage))">
<!-- Name -->
<h4><a href="#">{{Review.ReviewName}}</a></h4>
<!-- Address -->
<!-- Contact details -->
<!-- About Agency -->
<p>{{Review.ReviewContent}}</p>
<a href="#" class="btn btn-color btn-sm">{{Review.ReviewDateTime}}</a>
</div>
<pager total-items="totalItems" ng-model="currentPage" items-per-page="ItemsPerPage"></pager>
</div>
Angular JS Code Angular JS代码
$http({
method: 'GET',
url: 'http://localhost:62012/api/RestaurantReviews/getReviewByRestaurant/' + ID
}).success(function (response) {
$scope.Reviews = response;
TotalItems = $scope.Reviews.length;
//Pagination
$scope.totalItems = TotalItems;
$scope.currentPage = 1;
$scope.itemsPerPage = 5;
$scope.maxSize = 5;
}).error(function (err) {
alert(JSON.stringify(err));
})
There is a typo of the HTML. HTML有一个错字。
<pager total-items="totalItems"
ng-model="currentPage" items-per-page="ItemsPerPage">
</pager>
Should be: 应该:
<pager total-items="totalItems"
ng-model="currentPage" items-per-page="itemsPerPage">
</pager>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.