2017-12-06 17:45:54 +01:00
|
|
|
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 {
|
2017-12-11 12:05:30 +01:00
|
|
|
return elementPage == this.currentPageIndex ; //TODO
|
2017-12-06 17:45:54 +01:00
|
|
|
}
|
|
|
|
}
|