ng2 – dynamically creating a component based on a template
Update2: As @estus mentioned in comments version with className won’t work with minification. To do it working with minification you can 1) add some static key on each of your entryComponents like: export LineChartComponent { static key = “LineChartComponent”; } and then use this key as unique. const factoryClass = <Type<any>>factories.find((x: any) => x.key === … Read more