@Component({ selector: 'my-app', template: ` <template #alertContainer></template> `, }) export class App { @ViewChild("alertContainer", { read: ViewContainerRef }) container; }