The angular router documentation has the following snippet on how to make active router links exact:
The RouterLinkActive directive toggles css classes for active RouterLinks based on the current RouterState. This cascades down through each level of the route tree, so parent and child router links can be active at the same time. To override this behavior, you can bind to the [routerLinkActiveOptions] input binding with the { exact: true } expression. By using { exact: true }, a given RouterLink will only be active if its URL is an exact match to the current URL.
Does anyone have an demo of an exact router link?
<a [routerLink]="/inbox" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}"> Inbox </a>
? – Max Koretskyi