Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

jquery - Angular DataTable - Custom Pagination & Info

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. Pagination Format

  2. Pagination Info needs to be like below.

enter image description here

Looking forward to responses.

Please help if anyone has faced issues similar to this.

~~Suriya

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 :):)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...