• Previous
    • Previous
      • Previous
      • DEVHIDE
        • Home (current)
        • About
        • Contact
        • Cookie
        • Home (current)
        • About
        • Contact
        • Cookie
        • Disclaimer
        • Privacy
        • TOS
        Login Or Sign up

        How to create Custom pagination in angular 2+?

        1.5k Views Asked by noob At 26 September 2018 at 14:11 2025-12-19T04:11:26.634749
        <nav aria-label="Page navigation example">
          <ul class="pagination">
            <li class="page-item"><a class="page-link" href="#">Previous</a></li>
            <li class="page-item"><a class="page-link" href="#">1</a></li>
            <li class="page-item"><a class="page-link" href="#">2</a></li>
            <li class="page-item"><a class="page-link" href="#">3</a></li>
            <li class="page-item"><a class="page-link" href="#">Next</a></li>
          </ul>
        </nav>
        

        I am new in angular please help...

        I want to use above bootstrap pagination code on my custom pagination component and also when I use pagination component in another component html as

        (app-paginate [somedata]="somevalue" and event> _______ (/app-paginate>

        It should work...

        NOTE: I have already used ngx-bootstrap pagination so please don't provide that answer, I want to make my own pagination component.

        sorry for my poor english ..

        THANK YOU

        angular pagination custompaging
        Original Q&A
        1

        There are 1 best solutions below

        0
        Hugo Barreteau Hugo Barreteau On 26 September 2018 at 16:43

        If you know of ngx-bootstrap and like their component but want a different look, you can check their implementation of the pagination component on github, and then adapt to your case.

        Here is an example of a custom version of the previous button, with roughly the same typescript code :

        <li *ngIf="directionLinks" class="page-item" [class.disabled]="!hasPrevious() || disabled">
            <a aria-label="Previous" i18n-aria-label="@@pagination.previous-aria"class="page-link" href (click)="!!selectPage(page-1)"
              [attr.tabindex]="(hasPrevious() ? null : '-1')">
              <myCustomIcon aria-hidden="true"></myCustomIcon >
              <span class="sr-only" i18n="@@pagination.previous"></span>
            </a>
          </li>
        

        Related Questions in ANGULAR

        • Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
        • Module '"angular2/angular2"' has no exported member 'For'
        • import syntax in typescript creating another js file in visual studio
        • Separate ts file for imports
        • How to use an AngularJS 2 component multiple times in the same page?
        • injectables not working in angular 2.0 latest build 26
        • Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
        • Import {} from location is not found in VS Code using TypeScript and Angular 2
        • Angular 2/Typescript: require not found
        • ng-switch in Angular2
        • Angular 2 import issue: "Zone already exported on window the object!"
        • How to make FileReader work with Angular2?
        • Writing the most basic Unit test in Angular 2?
        • Angular2: Creating child components programmatically
        • AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined

        Related Questions in PAGINATION

        • Using pagination on a table in AngularJS
        • PFQueryTableViewController pagination doesn't work with heightForRowAtIndexPath
        • yii 2 pagination is losing filter data in the model
        • How to show variable in view blade.php page using laravel paginator::make
        • How i can get the numbers on the left and the right of the given element?
        • Pagination in Yii framework doesn't work correctly
        • Add paging buttons to gridview pagersetting set to Numeric
        • More efficient way of paginating in Django
        • Wrong pagination link count laravel
        • AWS s3 listobjects with pagination
        • Wordpress: Error 404 with pagination in custom taxonomy in home
        • WP : Custom Post Type pagination by cats Issue
        • Mnesia pagination with fragmented table
        • Why does Instagram's pagination return the same page over and over?
        • how to use Where condition in Pagination using cakephp

        Related Questions in CUSTOMPAGING

        • Solution to Simple Paging Logic. ASP.NET MVC3
        • How to setup paging with Gridview and code behind (no data source)
        • ObjectDataSource paging and extra parameters
        • Custom paging logic in MVC 4 view with Stored procedures
        • How to put rounded corners to canvas image?
        • Paging in asp.net mvc like blogger
        • Autopaging or custom paging which is better in datagrid?
        • Design guidance on Business Layer Paging
        • jsRender and paging
        • Gridview BottomPagerRow not finding
        • Custom paging in ASP Gridview using stored procedures
        • How to create Custom pagination in angular 2+?
        • Xtragridview view paging style
        • Slick Slider - customPaging (ie. 01/04) - Change color and font-size
        • Best stored procedure for paging in SQL server version 2008 in a large data?

        Trending Questions

        • UIImageView Frame Doesn't Reflect Constraints
        • Is it possible to use adb commands to click on a view by finding its ID?
        • How to create a new web character symbol recognizable by html/javascript?
        • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
        • Heap Gives Page Fault
        • Connect ffmpeg to Visual Studio 2008
        • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
        • How to avoid default initialization of objects in std::vector?
        • second argument of the command line arguments in a format other than char** argv or char* argv[]
        • How to improve efficiency of algorithm which generates next lexicographic permutation?
        • Navigating to the another actvity app getting crash in android
        • How to read the particular message format in android and store in sqlite database?
        • Resetting inventory status after order is cancelled
        • Efficiently compute powers of X in SSE/AVX
        • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

        Popular # Hahtags

        javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

        Popular Questions

        • How do I undo the most recent local commits in Git?
        • How can I remove a specific item from an array in JavaScript?
        • How do I delete a Git branch locally and remotely?
        • Find all files containing a specific text (string) on Linux?
        • How do I revert a Git repository to a previous commit?
        • How do I create an HTML button that acts like a link?
        • How do I check out a remote Git branch?
        • How do I force "git pull" to overwrite local files?
        • How do I list all files of a directory?
        • How to check whether a string contains a substring in JavaScript?
        • How do I redirect to another webpage?
        • How can I iterate over rows in a Pandas DataFrame?
        • How do I convert a String to an int in Java?
        • Does Python have a string 'contains' substring method?
        • How do I check if a string contains a specific word?
        .

        Copyright © 2021 Jogjafile Inc.

        • Disclaimer
        • Privacy
        • TOS
        • Homegardensmart
        • Math
        • Aftereffectstemplates