Skip to content

Commit 28f30d6

Browse files
authored
feat: support feature flagging tabs in page header (#921)
* feat: support feature flagging tabs in page header
1 parent a124263 commit 28f30d6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

projects/components/src/header/page/page-header.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ import { NavigableTab } from '../../tabs/navigable/navigable-tab';
3535
<ng-content></ng-content>
3636
3737
<ht-navigable-tab-group *ngIf="this.tabs?.length" class="tabs">
38-
<ht-navigable-tab *ngFor="let tab of this.tabs" [path]="tab.path" [hidden]="tab.hidden">
38+
<ht-navigable-tab
39+
*ngFor="let tab of this.tabs"
40+
[path]="tab.path"
41+
[hidden]="tab.hidden"
42+
[features]="tab.features"
43+
>
3944
{{ tab.label }}
4045
</ht-navigable-tab>
4146
</ht-navigable-tab-group>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export class NavigableTabComponent extends ContentHolder {
2525
public replaceHistory?: boolean;
2626

2727
@Input()
28-
public features: string[] = [];
28+
public features?: string[];
2929

3030
public get featureFlags(): string[] {
31-
return [...this.routeFeatures(), ...this.features];
31+
return [...this.routeFeatures(), ...(this.features ?? [])];
3232
}
3333

3434
private routeFeatures(): string[] {

0 commit comments

Comments
 (0)