I have a child control that I want to activate inside a mat-tab-group
control (I don't want to use mat-nav
because I want the animations provided by mat-tab-group
- and it's just easier to let the tab control handle component creation.
However my child route is activating in multiple places.
<mat-tab-group>
<mat-tab label="Animals">
<ng-component *ngIf="showCats">
Cats
</ng-component>
<ng-component *ngIf="!showCats">
Dogs
</ng-component>
</mat-tab>
<mat-tab label="FAQ">
<router-outlet></router-outlet>
</mat-tab>
</mat-tab-group>