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賦值