Use the following to add an active class to a menu item or active link when you are visiting the exact page:

<ion-item routerLinkActive="active-link" lines="none" routerDirection="forward" routerLink="/" [routerLinkActiveOptions]="{exact:
    true}">My link</ion-item>

 

 

 

 

Saved you some valuable time?

 

Donate and get more free time-saving code on this website in the future.