Skip to content
Snippets Groups Projects
Commit 5ebea244 authored by Fabien Forestier's avatar Fabien Forestier
Browse files

Merge branch '56-bug-navigation-history-with-dataset-details-tab-2' into 'development'

Resolve "[NavigationHistory] - Bug navigation history with dataset details tab"

See merge request refonte-data/portail-data!16
parents 0516a420 f679248e
No related branches found
No related tags found
2 merge requests!16Resolve "[NavigationHistory] - Bug navigation history with dataset details tab",!19Development
Pipeline #
<div class="page-details-background-image"></div> <div class="page-details-background-image"></div>
<div class="page-container has-white-background" *ngIf="metadata" [ngClass]="{'blury' : isLoading}"> <div class="page-container has-white-background" *ngIf="metadata" [ngClass]="{'blury' : isLoading}">
<div class="details-header"> <div class="details-header">
<app-page-header [pageInfo]="pageHeaderInfo"></app-page-header> <app-page-header [pageInfo]="pageHeaderInfo" [customGoToPreviousPage]="goToPreviousPage"></app-page-header>
</div> </div>
<div class="tabulations"> <div class="tabulations">
......
...@@ -17,19 +17,24 @@ export class PageHeaderComponent implements OnInit { ...@@ -17,19 +17,24 @@ export class PageHeaderComponent implements OnInit {
) { } ) { }
@Input() pageInfo: IPageHeaderInfo; @Input() pageInfo: IPageHeaderInfo;
@Input() customGoToPreviousPage: any;
ngOnInit() { ngOnInit() {
} }
goToPreviousPage() { goToPreviousPage() {
const index = 1; // Start to retrieve the previous element if (this.customGoToPreviousPage) {
let url = this._navigationHistoryService.getFromLast(index); this.customGoToPreviousPage();
} else {
const index = 1; // Start to retrieve the previous element
let url = this._navigationHistoryService.getFromLast(index);
// If url is null then redirect to home page // If url is null then redirect to home page
if (url == null) { if (url == null) {
url = `/${AppRoutes.home.uri}`; url = `/${AppRoutes.home.uri}`;
}
this._router.navigateByUrl(url);
} }
this._router.navigateByUrl(url);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment