Angular 2- ContentChidren of parent component are undefined when dynamically creating child component
问题 I've been trying to make a tab view and thought content projection might be a good approach.I learned it from this article. I thought that I could make it dynamic by just inputting a given array of components, and they would be displayed as the page for the selected tab. Here is my attempt at doing this: @Component({ selector: 'my-app', template:` <h1>Experiments</h1> <button class="add-button" (click)="add()">Add</button>` }) export class App { components:Array<any> = [PrepSetupTab