I have some link like this
<li routerLinkActive="active" class="nav-item">
<a [routerLink]="['contracts']"
[queryParams]="{ activeOnly: false }"
class="nav-link">Contracts</a>
</li>
You see here in params i have ?activeOnly=false with this approach all is ok when my url is like
contracts?activeOnly=false active css class is added in html and user can see that it is active link
The problem I have that sometimes url can be changed like this contracts?activeOnly=true&id=1 then active css does not apply anymore.
What i need is to have active css class on element even if url has changed with query params.
Example if url is like this contracts?activeOnly=true&id=1
active css class must also stay on LI html tag