<nav class="navbar navbar-expand bg-transparent"> <div class="container-fluid"> <div class="navbar-nav ms-auto"> <a class="nav-link px-3" *ngFor="let nav of navs; let i = index" [class.active]="selectedIndex === i" (click)="setIndex(i)" routerLink="/{{nav.toLowerCase( )}}">{{nav}}</a> </div> </div> </nav> <router-outlet></router-outlet>