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