分页控件在每页项目表达式时没有显示方向箭头,我在控制器中使用bower add dependencies安装了angular-utils-pagination。请告诉我该怎么做..
答案 0 :(得分:0)
您必须确保控件已添加到dirPagination.tpl.html
,如下所示:
<ul class="pagination" ng-if="1 < pages.length || !autoHide">
<li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == 1 }">
<a href="" ng-click="setCurrent(1)">«</a>
</li>
<li ng-if="directionLinks" ng-class="{ disabled : pagination.current == 1 }">
<a href="" ng-click="setCurrent(pagination.current - 1)">‹</a>
</li>
.... repeat items here ....
<li ng-if="directionLinks" ng-class="{ disabled : pagination.current == pagination.last }">
<a href="" ng-click="setCurrent(pagination.current + 1)">›</a>
</li>
<li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == pagination.last }">
<a href="" ng-click="setCurrent(pagination.last)">»</a>
</li>
</ul>
还要确保direction-links
指令true
设置为dir-pagination-controls
(默认)。
direction-links(可选,默认= true)指定是否显示 &#34;前锋&#34; &安培; &#34;向后&#34;分页中的箭头。
如果问题仍然存在,请通过Punkr / Fiddle / ...分享更多代码。我们可以更好地了解。