Commit 986c9303 authored by Jie Yuan's avatar Jie Yuan
Browse files

add back function to service component history view

parent fb3850ea
<br>
<div>
<button type="button" class="btn-xs" (click)="onBackClick()">
Back
</button>
</div>
<br>
<div class="serviceComponentContainer">
<div class="table-responsive-sm">
<table class="table table-hover">
......@@ -33,3 +42,6 @@
</table>
</div>
<router-outlet></router-outlet>
\ No newline at end of file
......@@ -16,7 +16,9 @@ export class ServiceCompHisComponent implements OnInit, OnDestroy {
servComp: ServiceComponent;
constructor(private servComponentService: ServiceComponentService) {
constructor(private servComponentService: ServiceComponentService,
public router: Router,
public route: ActivatedRoute) {
const sessionData = sessionStorage.getItem('currentServComp');
if (sessionData !== null) {
this.servComp = JSON.parse(sessionData);
......@@ -32,4 +34,9 @@ export class ServiceCompHisComponent implements OnInit, OnDestroy {
ngOnDestroy() {
}
onBackClick() {
console.log('on back click from component history view');
this.router.navigate(['/dashboard/fullTableComponent'], { relativeTo: this.route });
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment