Skip to content

Commit

Permalink
Fixed #10827 - The escape property does not work for label in Slide M…
Browse files Browse the repository at this point in the history
…enu component
  • Loading branch information
yigitfindikli committed Nov 9, 2021
1 parent 2c7bfe0 commit b36441f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/slidemenu/slidemenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {TooltipModule} from 'primeng/tooltip';
[ngClass]="{'p-disabled':child.disabled}" [attr.tabindex]="child.disabled || !isActive ? null : '0'"
(click)="itemClick($event, child, listitem)">
<span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
<span class="p-menuitem-text">{{child.label}}</span>
<span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
<span class="p-submenu-icon pi pi-fw pi-angle-right" *ngIf="child.items"></span>
</a>
<a *ngIf="child.routerLink" (keydown)="onItemKeyDown($event)" [routerLink]="child.routerLink" [queryParams]="child.queryParams" [routerLinkActive]="'p-menuitem-link-active'"
Expand All @@ -31,7 +32,8 @@ import {TooltipModule} from 'primeng/tooltip';
(click)="itemClick($event, child, listitem)"
[fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state">
<span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
<span class="p-menuitem-text">{{child.label}}</span>
<span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
<span class="p-submenu-icon pi pi-fw pi-caret-right" *ngIf="child.items"></span>
</a>
<p-slideMenuSub class="p-submenu" [item]="child" [index]="index + 1" [menuWidth]="menuWidth" *ngIf="child.items"></p-slideMenuSub>
Expand Down

0 comments on commit b36441f

Please sign in to comment.