Angularjs UI.引导分页自定义模板?
您好,我想告诉我们,如果有您可以告诉我一个正确的示例代码为Angularjs用户界面引导分页定制模板 我尝试在stackoverflow中搜索google和此处,但找不到任何关于如何使用模板url对此函数组件进行分页的正确示例或解释 我想将缓存模板“template/pagination/pagination.html”更改为类似这样的内容Angularjs UI.引导分页自定义模板?,angularjs,pagination,angular-ui-bootstrap,Angularjs,Pagination,Angular Ui Bootstrap,您好,我想告诉我们,如果有您可以告诉我一个正确的示例代码为Angularjs用户界面引导分页定制模板 我尝试在stackoverflow中搜索google和此处,但找不到任何关于如何使用模板url对此函数组件进行分页的正确示例或解释 我想将缓存模板“template/pagination/pagination.html”更改为类似这样的内容 代码在这里。。。 您应该能够在HTML中定义自定义模板,如下所示: <script type="text/ng-template" id="te
代码在这里。。。
您应该能够在HTML中定义自定义模板,如下所示:
<script type="text/ng-template" id="template/pagination/pagination.html">
<div class="pager">
<div class="page" ng-click="selectPage(page.number)" ng-repeat="page in pages" ng-class="{active: page.active, disabled: page.disabled}">{{page.text}}</div>
</div>
</script>
可以使用指令替代模板。因为它与默认引导分页模板具有相同的ID,所以它将覆盖它。请参见演示
div.page {
float:left;
background-color: #cccccc;
width:20px;
height:20px;
}
div.active {
font-weight: bold;
background-color: #ffffff;
}