如文件angular ui bootstrap here中所述。我用它如下,但它似乎不起作用
<pagination
items-per-page="pagesize"
total-items="totalItems"
page="currentPage"
max-size="maxSize"
class="pagination-sm"
boundary-links="true"
rotate="false"
num-pages="numPages"
on-select-page="refreshList"
>
</pagination>
并在我的控制器中添加了
$scope.refreshList = function(page){
console.log(page);
$scope.userlist();
}
但确实有效。函数没有被调用。我在哪里做错了?
答案 0 :(得分:3)
在版本0.11.0 UI引导分页中,'page'和'onSelectPage'被替换为ng-model for page和ng-change for on-select-page。看看this
答案 1 :(得分:0)
它是一个表达式,因此您需要:refreshList()
<pagination
items-per-page="pagesize"
total-items="totalItems"
page="currentPage"
max-size="maxSize"
class="pagination-sm"
boundary-links="true"
rotate="false"
num-pages="numPages"
on-select-page="refreshList()">
</pagination>