Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions projects/common/src/navigation/navigation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ export class NavigationService {
public navigateWithinApp(
path: NavigationPath,
relativeTo?: ActivatedRoute,
preserveParameters?: string[]
preserveParameters?: string[],
replaceCurrentHistory?: boolean
): Observable<boolean> {
return this.navigate({
navType: NavigationParamsType.InApp,
path: path,
queryParams: this.buildQueryParam(preserveParameters ?? []),
relativeTo: relativeTo
relativeTo: relativeTo,
replaceCurrentHistory: replaceCurrentHistory
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class NavigableTabGroupComponent implements AfterContentInit {
});

public onTabClick(tab: NavigableTabComponent): void {
this.navigationService.navigateWithinApp([tab.path], this.activatedRoute);
this.navigationService.navigateWithinApp([tab.path], this.activatedRoute, [], tab.replaceHistory);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did i accidentally forget to remove it? This function shouldn't be used. We need to add this option to the buildNavigationParams

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this is nested inside an ht-link and should be deleted here and in the template

Copy link
Contributor Author

@arjunlalb arjunlalb May 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anandtiwary fixed this. Used ht-link in the component instead of hyperlink.

}

private findActiveTab(): NavigableTabComponent | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export class NavigableTabComponent extends ContentHolder {
@Input()
public hidden: boolean = false;

@Input()
public replaceHistory?: boolean;

@Input()
public features: string[] = [];

Expand Down
1 change: 1 addition & 0 deletions projects/components/src/tabs/navigable/navigable-tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface NavigableTab {
label: string;
hidden?: boolean;
features?: string[];
replaceHistory?: boolean;
}