npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-pagination-bootstrap

v1.6.0

Published

A bootstrap(4) based angular(4+) pagination module.

Downloads

767

Readme

ngx-pagination-bootstrap

GitHub license npm Build Status Codecov branch npm GitHub top language GitHub code size in bytes GitHub issues GitHub closed issues GitHub contributors

ngx-pagination-bootstrap is Bootstrap(4) based pagination module for Angular(2+) applications.

Examples

Installation

  • npm install ngx-pagination-bootstrap
  • npm install [email protected] --save-dev
  • include bootstrap scripts and styles in you angular-cli.json to be build of your build process.
  • or include bootstrap css in your index.html
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
  • Right now [email protected] is supported till v1.5.0.
  • Bootstrap v4.0.0 supported from v1.6.0 onwards.

For webpack and tsc builds/ angular-cli builds

  • import PaginationModule from ngx-pagination-bootstrap:
import { PaginationModule } from 'ngx-pagination-bootstrap'
  • add PaginationModule to the imports of your NgModule:
@NgModule({
  imports: [
    ...,

    PaginationModule
  ],
  ...
})
class YourModule { ... }
  • use <ng-pagination></ng-pagination> in your templates to add pagination in your view like below
<ng-pagination [position]="'left'" [pageSize]="10" [itemsCount]="data.length" [data]="data" (getPageData)="getPageData($event)"></ng-pagination>
  • do not forget to include bootstrap css in your build process, module or index.html!

Config

Input

  • pageSize: number - Size of a page i.e number of items to be displayed in one page.
  • itemsCount: number - total no of itmes that needs ro be paged/total no of records.
  • position: string - position of the pagination respect to parent contrainer of your pagination component.
  • data: Array - Optional | the data needs to be paged default is null. If pagination is handled by api no need of data.

Output

  • getPageData: EventEmitter - emmited when user navigates to a page. Caputure this and update you view data. The events contains the following info
{
    event: event: Event,
    pageNo: pageNo: number,
    pageSize:pageSize: number,
    data: null| Array,
}
  • event: the triggered event
  • pageNo: current page number
  • pageSize: current page size. No of items per page
  • data: data is the array of records that belongs to this page. Will be null if data was not passed and you can fetch data from your api or the way you want it to handle

Changelog

  • v1.4.1
 Added support for Observable Data Source.
 Current items range display bug when itemcount 0 bug fix .
  • v1.5.0
Angular 4.0.0 support added
Minor bug fixes
  • v1.6.0
Bootstrap 4.0.0 supported
Range of items hidden on small devices

Help Improve

Found a bug or an issue with this? Open a new issue here on GitHub.

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.