htmlhtml
<div ng-controller="paginationDemoCtrl" class="text-center">函数
<pagination class="pagination-sm" total-items="totalItems" page="currentPage" on-select-page="pageChanged(chenyiqi)" previous-text="‹" next-text="›" num-pages="numPages" ></pagination><pre>共{{ numPages }}页,{{ totalItems }}条</pre>
spa
</div>htm
指令作用域
scope: {it
page: '=',io
totalItems: '=',class
onSelectPage:' &'select
},rsa
指令中的onSelectPage指定引用标签中指明的父做用域中的函数,传递参数为chenyiqi;
$scope.onSelectPage({ chenyiqi: page });
在此处将给参数chenyiqi赋值