Angular Dynamic Components: @ViewChildren get ViewContainerRef for every component in QueryList
问题 I am building a dialog with dynamic tabs that can receive a component to be placed in the tab body. I am having a hard time creating multiple dynamic components using @ViewChildren. I have successfully done this with a single component and @ViewChild in the past quite easily. Here is my template: <mat-tab *ngFor="let tab of tabs" [label]="tab.label"> <ng-template #comp></ng-template> </mat-tab> Here is my component logic: @ViewChildren("comp") dynComponents: QueryList<any>; public