Socket
Socket
Sign inDemoInstall

ngc-pagination

Package Overview
Dependencies
80
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.2.4

11

module/ngc-pagination.component.ts

@@ -66,2 +66,3 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';

}
else {

@@ -106,3 +107,3 @@ this.buttonsDisabled = false;

private createPagination() {
this.config.getValue().totalPages = this.config.getValue().totalItens < this.config.getValue().itensPerPage ? 1 : Math.round(this.config.getValue().totalItens / this.config.getValue().itensPerPage);
this.config.getValue().totalPages = this.config.getValue().totalItens < this.config.getValue().itensPerPage ? 1 : Math.ceil(this.config.getValue().totalItens / this.config.getValue().itensPerPage);
this.config.getValue().pagination = [];

@@ -116,10 +117,10 @@

private createExibition() {
let start = Math.floor((this.config.getValue().currentPage-1) - this.config.getValue().range/2 < 0 ? 0 : this.config.getValue().currentPage-this.config.getValue().range/2);
let end = Math.floor(this.config.getValue().currentPage < this.config.getValue().range/2 ? this.config.getValue().range : (this.config.getValue().currentPage) + this.config.getValue().range/2);
let start = Math.ceil((this.config.getValue().currentPage-1) - this.config.getValue().range/2 < 0 ? 0 : (this.config.getValue().currentPage - 1) -this.config.getValue().range/2);
let end = Math.ceil(this.config.getValue().currentPage <= this.config.getValue().range/2 ? this.config.getValue().range+1 : (this.config.getValue().currentPage) + (this.config.getValue().range/2));
let diff = end - this.config.getValue().pagination.length;
if (diff > 0) {
let startCount = this.config.getValue().pagination.length - this.config.getValue().range -1;
start = startCount < 0 ? 0 : startCount;
end -= diff;
start -= diff;
}

@@ -126,0 +127,0 @@

{
"name": "ngc-pagination",
"version": "0.1.4",
"version": "0.2.4",
"description": "Simple pagination for Angular v4+",

@@ -5,0 +5,0 @@ "scripts": {

# ngc-pagination
Simple pagination for Angular v2+
Simple pagination for Angular v4+

@@ -5,0 +5,0 @@ ![](http://g.recordit.co/hMI2hoTtG7.gif)

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc