Unable to set the ion-tab-button active

here i am using ion-tab- bar and below is my tab bar


here instead i am using routerlink on ion-tab-button so when i clicked on the tab1 is not showing the icon as active. It simply shows like below

You can replace routerLink with tab attribute of the ion-tab-button, ion-tab-button tab=“tab1”. It’s used internally to reference the selected tab or by the router to switch between them.

Here tab1 is the pathName for the required page.