19 lines
423 B
TypeScript
19 lines
423 B
TypeScript
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 === this.currentPageIndex; //TODO
|
|
}
|
|
}
|