K
K
Konstantin2020-04-17 17:32:07
Angular
Konstantin, 2020-04-17 17:32:07

Is it possible to render components in mat tab?

For some reason, this approach to show components in tabs gives me a buffer overflow - and without errors:

<mat-tab-group
  animationDuration="0ms"
  [selectedIndex]="selectedTabIndex"
  (selectedTabChange)="tabChanged($event)"
>
  <mat-tab *ngFor="let order of getorderVersionsService()">
    <ng-template mat-tab-label>
      {{ order.versionid }}
    </ng-template>

    <!-- Content-->

    <ng-template matTabContent>
      <app-order-definition [orderDefinition]="order"></app-order-definition>
    </ng-template>
  </mat-tab>
</mat-tab-group>


Does Angular even allow components to be rendered in a loop in the body?
<app-order-definition [orderDefinition]="order"></app-order-definition>


For some reason, this approach hangs for me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2020-04-17
@Junart1

Easy to check
https://stackblitz.com/edit/angular-selecting-matt...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question