18 lines
458 B
TypeScript
18 lines
458 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
|
|
}
|
|
} |