When selecting an item from the list, I want to highlight the selected item. How can I achieve this?
Here is the code snippet:
<li class="nav-item dropdown">
<div class="dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Dashboard
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a *ngIf="enableActivityDashboardFeature" class="dropdown-item selected" href="#"
[routerLink]="['dashboarda']">Dashboarda</a>
<a *ngIf="enableActualsDashboardFeature" class="dropdown-item" href="#"
[routerLink]="['dashboard']">DashboardA</a>
<a *ngIf="enableActualsDashboardBetaFeature" class="dropdown-item" href="#"
[routerLink]="['dashboardb']">DashboardB</a>
<a *ngIf="enableGrillsDashboardFeature" class="dropdown-item" href="#"
[routerLink]="['dashboardc']">Dashboardcs</a>
<a *ngIf="enableGrillsV2DashboardFeature" class="dropdown-item" href="#"
[routerLink]="['dashboardd']">Dashboardd</a>
<a *ngIf="enableValuationsDashboard" class="dropdown-item" href="#" [routerLink]="['dashboarde']">Dashboarde</a>
</div>
</div>
</li>
Is there a way to keep the selected cell highlighted after selecting an item from the dropdown?