Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@99xt/ngx-pagination

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@99xt/ngx-pagination

Simple pagination for angular2+ apps

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@99xt/ngx-pagination

npm (scoped) license

Simple pagination component for angular2+ apps.

Installation

To install this library, run:

npm install @99xt/ngx-pagination --save

Usage

example.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { ExampleComponent } from './example.component';

// Import the library
import { PaginationModule } from '@99xt/ngx-pagination';

@NgModule({
  declarations: [
    ExampleComponent
  ],
  imports: [
    BrowserModule,
    PaginationModule
  ],
  providers: [],
  bootstrap: [ ExampleComponent ]
})
export class ExampleModule { }

example.component.ts

export class ExampleComponent {
  totalRecordCount: number;
  selectedPage: number;
  recordsPerPage: number;

  constructor() {
    this.totalRecordCount = 330;
    this.recordsPerPage = 10;
    this.selectedPage = 1;
  }

  selectPage(page: number) {
    this.selectedPage = page;
    // call your page contents loading method here
  }
}

example.component.html

<pagination
  [total]="totalRecordCount"
  [limit]="recordsPerPage"
  (onSelectPage)="selectPage($event)">
</pagination>

Contributing Guide

Setting up the development environment

Clone the repository to your workstation

git clone git@github.com:99xt/ngx-pagination.git

Navigate to the project directory

cd ngx-pagination

Install and build the library

Generate all *.js, *.d.ts files

npm install
npm run build

You can find the compiled version in the dist/

Create a symlink from the dist directory to the global node_modules

cd dist
npm link

To lint all *.ts files:

$ npm run lint

Run Demo app

cd demo
npm install
npm start

Publish to NPM

Update the version in src/package.json;

npm run build
npm publish dist

License

MIT

FAQs

Package last updated on 20 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc