navbar.component.html 1.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
<nav class="navbar navbar-expand-md navbar-dark py-0 mb-5">
  <div class="container px-0">
    <a class="navbar-brand d-flex align-items-center mr-0 px-2" routerLink="/">
      <img src="assets/logo.png" alt="Logo" title="{{ navbar.title }}" height="60px"/>
    </a>
    <button class="navbar-toggler" type="button" (click)="toggleNavbar()">
      <span class="fa fa-bars"></span>
    </button>
    <div id="navbar" class="collapse navbar-collapse" [class.collapse]="navbarCollapsed">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item" *ngFor="let link of navbar.links">
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
          <div *ngIf="!link.subMenu">
            <a class="nav-link d-flex align-items-center"
               [href]="link.url" target="_blank">{{ link.label }}</a>
          </div>
          <!-- Dropdown -->


          <div *ngIf="link.subMenu" class="dropdown-container">


            <a class="nav-link d-flex align-items-center dropdown-toggle" data-toggle="dropdown"
               [href]="link.url"
               role="button"
               aria-haspopup="true"
               aria-expanded="false"
               target="_blank">{{ link.label }}</a>
            <div class="dropdown-menu">
              <div *ngFor="let subItem of link.subMenu">
                <a class="dropdown-item"
                   href="{{ subItem.url }}">{{ subItem.label }}</a>
              </div>
            </div>
          </div>

36
37
38
39
40
        </li>
      </ul>
    </div>
  </div>
</nav>