Skip to content

Commit

Permalink
Fixes #16201
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Aug 8, 2024
1 parent 7c6f44c commit 4fef99b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/app/components/menubar/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export class MenubarService {
<a
*ngIf="!getItemProp(processedItem, 'routerLink')"
[attr.href]="getItemProp(processedItem, 'url')"
[attr.aria-hidden]="true"
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
[attr.data-pc-section]="'action'"
[target]="getItemProp(processedItem, 'target')"
Expand All @@ -119,7 +118,6 @@ export class MenubarService {
[ngClass]="getItemProp(processedItem, 'icon')"
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
[attr.data-pc-section]="'icon'"
[attr.aria-hidden]="true"
[attr.tabindex]="-1"
>
</span>
Expand All @@ -133,18 +131,17 @@ export class MenubarService {
<ng-container *ngIf="isItemGroup(processedItem)">
<ng-container *ngIf="!submenuIconTemplate">
<AngleDownIcon [styleClass]="'p-submenu-icon'" *ngIf="root" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
<AngleRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!root" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
<AngleDownIcon [styleClass]="'p-submenu-icon'" *ngIf="root" [attr.data-pc-section]="'submenuicon'" />
<AngleRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!root" [attr.data-pc-section]="'submenuicon'" />
</ng-container>
<ng-template *ngTemplateOutlet="submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
<ng-template *ngTemplateOutlet="submenuIconTemplate" [attr.data-pc-section]="'submenuicon'"></ng-template>
</ng-container>
</a>
<a
*ngIf="getItemProp(processedItem, 'routerLink')"
[routerLink]="getItemProp(processedItem, 'routerLink')"
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
[attr.tabindex]="-1"
[attr.aria-hidden]="true"
[attr.data-pc-section]="'action'"
[queryParams]="getItemProp(processedItem, 'queryParams')"
[routerLinkActive]="'p-menuitem-link-active'"
Expand All @@ -165,18 +162,17 @@ export class MenubarService {
[ngClass]="getItemProp(processedItem, 'icon')"
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
[attr.data-pc-section]="'icon'"
[attr.aria-hidden]="true"
[attr.tabindex]="-1"
></span>
<span class="p-menuitem-text" *ngIf="getItemProp(processedItem, 'escape'); else htmlRouteLabel">{{ getItemLabel(processedItem) }}</span>
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="getItemLabel(processedItem)" [attr.data-pc-section]="'label'"></span></ng-template>
<span class="p-menuitem-badge" *ngIf="getItemProp(processedItem, 'badge')" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
<ng-container *ngIf="isItemGroup(processedItem)">
<ng-container *ngIf="!menubar.submenuIconTemplate">
<AngleDownIcon [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" *ngIf="root" />
<AngleRightIcon [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" *ngIf="!root" />
<AngleDownIcon [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" *ngIf="root" />
<AngleRightIcon [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" *ngIf="!root" />
</ng-container>
<ng-template *ngTemplateOutlet="menubar.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
<ng-template *ngTemplateOutlet="menubar.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'"></ng-template>
</ng-container>
</a>
</ng-container>
Expand Down

0 comments on commit 4fef99b

Please sign in to comment.