角度数据表 - 自定义分页和信息 [英] Angular DataTable - Custom Pagination & Info

查看:250
本文介绍了角度数据表 - 自定义分页和信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Angular JS的新手。我试图实现数据表。
我指的是下面的链接。




  • 分页信息需要如下。




  • 期待回复。 / p>

    如果有人遇到过类似的问题,请帮忙。



    ~~ Suriya

    解决方案

    我已经修复了页面信息问题。请参阅下面的代码。

      vm.dtOptions = DTOptionsBuilder.newOptions()。withPaginationType('full')
    .withDisplayLength(10)
    .withOption('bFilter',false)
    .withDOM('<top pull-left itemtableInfoi> rt<bottomp>')
    .withLanguage({
    sInfo:'< div>< span class =searchDetail>显示< b> \'+ $ rootScope.searchValue +'\ / b>< / span>< span class =searchCount pull-right>显示_START_到_END_< a>显示全部< / a>< / span>',
    处理 Processing ...,
    loadingRecords:Loading ...,
    paginate:{
    first:'< i class =fa fa-backward aria-hidden =true>< / i>',
    last:'< i class =fa fa-forwardaria-hidden =true>< / i>',
    next:Next,
    previous :上一个
    }
    });

    但仍然无法解析分页按钮定制。我正在关闭这个问题,因为我已经发布了另一个页面控制问题。 。



    链接



    角度数据 - 获取当前页面&总页面



    如果任何人有更好的解决方案,请提供您的建议:) :)


    I am new to Angular JS. I am trying to implement datatables. I am referring the link below.

    http://l-lin.github.io/angular-datatables/

    Now i need to implement some custom changes to the datatable configurations.

    Eg.

    1. Pagination options i need to be in the format provided in the below image.

    2. Pagination Info needs to be like below.

    Looking forward to responses.

    Please help if anyone has faced issues similar to this.

    ~~Suriya

    解决方案

    I have fixed the page info problem. Please see the code below.

    vm.dtOptions = DTOptionsBuilder.newOptions().withPaginationType('full')
                         .withDisplayLength(10)
                         .withOption('bFilter', false)
                         .withDOM('<"top pull-left itemtableInfo"i>rt<"bottom"p>')
                         .withLanguage({
                              "sInfo": '<div><span class="searchDetail">Displaying _TOTAL_ results for <b>\"'+$rootScope.searchValue+'\"</b> </span><span class="searchCount pull-right">Showing _START_ to _END_ <a>Show All</a></span>',
                               "processing": "Processing...",
                               "loadingRecords": "Loading...",
                               "paginate": {
                                    "first": '<i class="fa fa-backward" aria-hidden="true"></i>',
                                    "last": '<i class="fa fa-forward" aria-hidden="true"></i>',
                                    "next": "Next",
                                    "previous": "Previous"
                                }
                         });
    

    But still couldn't resolve the pagination button customization. I am closing this question as i have posted another question for page control issue. .

    Link :

    Angular datatable - get current page & Total page

    If anyone have better solution for both the issues, please provide me with your suggestions :):)

    这篇关于角度数据表 - 自定义分页和信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆