I'm creating a component that receives another component through an input which you can see in this stackblitz demo. If you look at the @Input()
of the ParentComponent
you'll see it's defined as
@Input() ComponentToEmbed : eComponentType<Component>;
I came across this StackOverflow question from 4 years ago, which suggested using ComponentType<T>
, which is what made me try it. However, in my Angular 13 app, there is no such a thing as ComponentType
being found when I begin typing. I looked on the doc pages and didn't see anything mentioning ComponentType<T>
. What should I do to type the @Input()
properly?