This commit is contained in:
geek 2018-06-11 22:31:42 +09:00
parent a1b513f766
commit 3db6aa80e6
2 changed files with 7 additions and 5 deletions

View File

@ -18,7 +18,7 @@
</ng-template>
<ng-template pTemplate="body" let-target let-rowIndex="rowIndex">
<tr [pSelectableRow]="target">
<td>{{rowIndex + 1}}</td>
<td>{{(rowIndex + 1) + ((pageIdx - 1) * countPerPage)}}</td>
<td></td>
<td>{{target.infra.metaInfraType.name}}</td>
<td>{{target.displayName}}</td>

View File

@ -45,16 +45,18 @@ export class ListComponent implements OnInit, OnChanges {
pending$: Observable<boolean>;
error$: Observable<any>;
countPerPage: number;
constructor(
private store: Store<any>,
private targetService: TargetService,
private location: PlatformLocation
) {
this.countPerPage = 2;
}
ngOnInit() {
this.getTargetList();
// this.getTargetList();
}
ngOnChanges(changes: SimpleChanges): void {
@ -76,7 +78,7 @@ export class ListComponent implements OnInit, OnChanges {
const pageParams: PageParams = {
pageNo: p,
countPerPage: 2,
countPerPage: this.countPerPage,
sortCol: 'id',
sortDirection: 'descending',
};