'two mat-tabs in one component
Im looking for a way to include encompass two mat-tabs of an angular mat-tab group in one component for including in a parent component which has the mat-tab-group in its template, ie.
parent.html
<mat-tab-group>
<mat-tab> First tab </mat-tab>
<child-component-with-two-tabs></child-component-with-two-tabs>
</mat-tab-group>
I need to do this because the two tabs of the child component have some common logic and I don't want to use a service. Just having the two mat-tabs in the child component template does not work (why is that?). My instinct tells me I need to have something like a component with two templates, but I could not find anything on this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
