I have a navigation bar icon that links to an admin
route. I want this icon to change its appearance when on that specific route. To achieve this, I can simply replace the mdi-settings-outline
class with mdi-settings
, displaying a filled version of the same icon.
<li class="nav-item">
<a routerLink="/admin" routerLinkActive="mdi-settings" class="nav-link mdi mdi-settings-outline"></a>
</li>
However, the standard behavior of the routerLinkActive
directive is to only add the mdi-settings
class to the link, which does not produce the desired effect. Is there a way for the routerLinkActive directive to replace the class instead of just adding it?