menu: hide undefined icons

Hide my-global-icon when custom menu items are added without icon property.
This commit is contained in:
kontrollanten 2022-01-15 07:53:46 +01:00 committed by Chocobozzz
parent 884b17773d
commit c333ec098d
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@
<div i18n class="block-title">{{ menuSection.title }}</div> <div i18n class="block-title">{{ menuSection.title }}</div>
<a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active"> <a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active">
<my-global-icon [iconName]="link.icon" aria-hidden="true"></my-global-icon> <my-global-icon *ngIf="link.icon" [iconName]="link.icon" aria-hidden="true"></my-global-icon>
<ng-container>{{ link.shortLabel }}</ng-container> <ng-container>{{ link.shortLabel }}</ng-container>
</a> </a>
</div> </div>