import { Injectable } from '@angular/core' @Injectable() export class PaginationService { private currentPageIndex: number; public setCurrentIndex(currentPageIndex: number): void { this.currentPageIndex = currentPageIndex; } public getCurrentIndex():number{ return this.currentPageIndex; } public isElementVisible(elementPage: number):boolean { return elementPage - 1 == this.currentPageIndex ; //TODO } }