Why content disappears when switching tabs?

I use mat-tab not as smart wrapper, and switching between them is lost content part. But, when you first initialize the content part of the present. Why content is lost when switching?
the code is not smart wrapper:
<mat-tab-group mat-align-tabs="start" (selectedTabChange)="onTabChanged($event)" [selectedIndex]="selectIndex">
 <ng-container *ngFor="reportLabel let of labels">
 <mat-tab label="{{reportLabel}}">
<ng-content></ng-content>
</mat-tab>
</ng-container>
</mat-tab-group>

@Input() labels: any;
 @Input() selectIndex: any;

 @Output() tabChanged: EventEmitter<any> = new EventEmitter<any>();
 onTabChanged(tabChangeEvent: MatTabChangeEvent): any {
this.tabChanged.emit(tabChangeEvent);
 }

the code for the main components:
<app-tabs-group (tabChanged)="tabChanged($event)" [selectIndex]="0" [labels]="reportLabels">
 <div class="wrap">
123123
</div>
 </app-tabs-group>

reportLabels = ['1 year', '6 months', '3 months', 'month'];
April 19th 20 at 12:37
0 answer

Find more questions by tags Angular