I am attempting to create an ngClass condition that adds an active class to a list element. Specifically, I want it to work for both the URLs '/companies' and '/company/:id'.
The issue I am facing is that the current setup does not function properly for the '/company/:id' URL. How can I modify the condition so that it works for any 'id' instead of specifically ':id'?
<li class="nav-item" [ngClass]="{'active': menuActive === '/companies', 'active': menuActive.includes('/company')}" *ngIf="isLoggedIn">