Skip to content

Commit 3c51f24

Browse files
committed
fix: minor changes
1 parent c002114 commit 3c51f24

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

projects/common/src/navigation/navigation.service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,13 @@ export class NavigationService {
131131
public navigateWithinApp(
132132
path: NavigationPath,
133133
relativeTo?: ActivatedRoute,
134-
preserveParameters?: string[],
135-
replaceCurrentHistory?: boolean
134+
preserveParameters?: string[]
136135
): Observable<boolean> {
137136
return this.navigate({
138137
navType: NavigationParamsType.InApp,
139138
path: path,
140139
queryParams: this.buildQueryParam(preserveParameters ?? []),
141-
relativeTo: relativeTo,
142-
replaceCurrentHistory: replaceCurrentHistory
140+
relativeTo: relativeTo
143141
});
144142
}
145143

projects/components/src/tabs/navigable/navigable-tab-group.component.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { NavigableTabComponent } from './navigable-tab.component';
1515
<ng-container *ngFor="let tab of this.tabs">
1616
<ng-container *ngIf="!tab.hidden">
1717
<div class="tab-button" *htIfFeature="tab.featureFlags | htFeature as featureState">
18-
<ht-link mat-tab-link [paramsOrUrl]="this.buildNavParamsForTab(tab)" class="tab-link">
18+
<ht-link mat-tab-link [paramsOrUrl]="buildNavParamsForTab | htMemoize: tab" class="tab-link">
1919
<ng-container *ngTemplateOutlet="tab.content"></ng-container>
2020
<span *ngIf="featureState === '${FeatureState.Preview}'" class="soon-container">
2121
<span class="soon">SOON</span>
@@ -48,13 +48,12 @@ export class NavigableTabGroupComponent implements AfterContentInit {
4848
);
4949
}
5050

51-
public buildNavParamsForTab = (tab: NavigableTabComponent): NavigationParams =>
52-
({
53-
navType: NavigationParamsType.InApp,
54-
path: tab.path,
55-
relativeTo: this.activatedRoute,
56-
replaceCurrentHistory: tab.replaceHistory
57-
})
51+
public buildNavParamsForTab = (tab: NavigableTabComponent): NavigationParams => ({
52+
navType: NavigationParamsType.InApp,
53+
path: tab.path,
54+
relativeTo: this.activatedRoute,
55+
replaceCurrentHistory: tab.replaceHistory
56+
});
5857

5958
private findActiveTab(): NavigableTabComponent | undefined {
6059
return this.tabs.find(tab => this.navigationService.isRelativePathActive([tab.path], this.activatedRoute));

0 commit comments

Comments
 (0)