Reputation: 175
When I use the Angular Material 2 with md-tab-group
, the mat-ink-bar
shows up correctly and I can style it by using the .mat-ink-bar
class.
But when I use mat-tab-nav-bar
and router, the ink bar doesn't show. What could be the problem?
Thank you.
Upvotes: 2
Views: 2503
Reputation: 537
I have found Solution You need to write code like below add #rla="routerLinkActive" [active]="rla.isActive"
<a mat-tab-link [routerLink]="['/tab-1']" #rla="routerLinkActive" [active]="rla.isActive" routerLinkActive> Tab 1 </a>
<a mat-tab-link [routerLink]="['/tab-2']" #rla2="routerLinkActive" [active]="rla2.isActive" routerLinkActive> Tab 2 </a>
<a mat-tab-link [routerLink]="['/tab-3']" #rla3="routerLinkActive" [active]="rla3.isActive" routerLinkActive> Tab 3 </a>
Thanks
Upvotes: 1