ing
This commit is contained in:
parent
e908945d3e
commit
0bffcfb03b
|
@ -31,6 +31,7 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
<p-paginator #paginator [rows]="targetPage.size" [totalRecords]="targetPage.totalElements"
|
<p-paginator #paginator [rows]="targetPage.size" [totalRecords]="targetPage.totalElements"
|
||||||
(onPageChange)="onPaginate($event)" ></p-paginator>
|
(onPageChange)="onPaginate($event)"></p-paginator>
|
||||||
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { TargetService } from '../../service/target.service';
|
||||||
|
|
||||||
import { Paginator } from 'primeng/primeng';
|
import { Paginator } from 'primeng/primeng';
|
||||||
import { Page, PageParams} from '@overflow/commons-typescript';
|
import { Page, PageParams} from '@overflow/commons-typescript';
|
||||||
|
import {PlatformLocation} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'of-target-list',
|
selector: 'of-target-list',
|
||||||
|
@ -47,10 +48,16 @@ export class ListComponent implements OnInit, OnChanges {
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private targetService: TargetService,
|
private targetService: TargetService,
|
||||||
|
private location: PlatformLocation
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.location.onPopState(() => {
|
||||||
|
// alert(window.location);
|
||||||
|
this.paginator.changePage(this.pageIdx);
|
||||||
|
});
|
||||||
this.getTargetList();
|
this.getTargetList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +110,7 @@ export class ListComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPaginate(e) {
|
onPaginate(e) {
|
||||||
|
// e.changePage();
|
||||||
this.pageChange.emit(e.page);
|
this.pageChange.emit(e.page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ export class TargetDetailPageComponent implements OnInit {
|
||||||
private activatedRoute: ActivatedRoute
|
private activatedRoute: ActivatedRoute
|
||||||
) {
|
) {
|
||||||
this.targetID = this.activatedRoute.snapshot.params['targetID'];
|
this.targetID = this.activatedRoute.snapshot.params['targetID'];
|
||||||
console.log(this.targetID);
|
// console.log(this.targetID);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user