New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng2-pagination

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-pagination - npm Package Compare versions

Comparing version 0.0.1-alpha.6 to 0.0.1-alpha.7

2

package.json
{
"name": "ng2-pagination",
"version": "0.0.1-alpha.6",
"version": "0.0.1-alpha.7",
"description": "Pagination for Angular2",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,5 +11,3 @@ import {Component, Input, Output, EventEmitter} from 'angular2/core'

@Component({
selector: 'pagination-controls',
template: `
const DEFAULT_TEMPLATE = `
<ul class="pagination" role="navigation" aria-label="Pagination" *ngIf="!autoHide || pages.length === 0">

@@ -36,3 +34,3 @@

<li class="pagination-next" [class.disabled]="isLastPage()" *ngIf="directionLinks">
<a *ngIf="getCurrent() < pages.length" (click)="setCurrent(getCurrent() + 1)" aria-label="Next page">
<a *ngIf="!isLastPage()" (click)="setCurrent(getCurrent() + 1)" aria-label="Next page">
Next <span class="show-for-sr">page</span>

@@ -44,3 +42,11 @@ </a>

</ul>
`,
`;
function getTemplate(): string {
return PaginationService.template || DEFAULT_TEMPLATE;
}
@Component({
selector: 'pagination-controls',
template: getTemplate(),
directives: [CORE_DIRECTIVES]

@@ -113,2 +119,4 @@ })

private createPageArray(currentPage: number, itemsPerPage: number, totalItems: number, paginationRange: number): IPage[] {
// paginationRange could be a string if passed from attribute, so cast to number.
paginationRange = +paginationRange;
let pages = [];

@@ -115,0 +123,0 @@ const totalPages = Math.ceil(totalItems / itemsPerPage);

@@ -36,2 +36,7 @@ import {EventEmitter} from 'angular2/core'

// static template config
static templateUrl: string;
static template: string;
public register(instance: IPaginationInstance) {

@@ -38,0 +43,0 @@ if (!instance.id) {

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