aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/menu/top-menu-dropdown.component.html
blob: 2d6d1c4bfe5e39824379efd090887e939c5713f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div class="sub-menu">
  <ng-container *ngFor="let menuEntry of menuEntries">

    <a *ngIf="menuEntry.routerLink" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page">{{ menuEntry.label }}</a>

    <div *ngIf="!menuEntry.routerLink" ngbDropdown class="parent-entry" #dropdown="ngbDropdown" (mouseleave)="closeDropdownIfHovered(dropdown)">
      <span (mouseenter)="openDropdownOnHover(dropdown)" role="button" class="title-page" [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownToggle>
        <ng-container i18n>{{ menuEntry.label }}</ng-container>
        <ng-container *ngIf="!!suffixLabels[menuEntry.label]"> - {{ suffixLabels[menuEntry.label] }}</ng-container>
      </span>

      <div ngbDropdownMenu>
        <a *ngFor="let menuChild of menuEntry.children" class="dropdown-item" [routerLink]="menuChild.routerLink">{{ menuChild.label }}</a>
      </div>
    </div>

  </ng-container>
</div>