I have some components that I'd like to add to my page dynamically.
I have their name in a config file config.json
, currently the typescript classname MySuperComponent
. I can put anything I want in my config file is the class name is not suited.
I've tried some code with component resolver, but I can't pass a string to it.
This works:
this.resolver.resolveComponent(MySuperComponent)
This doesn't:
this.resolver.resolveComponent("MySuperComponent")
How can I instanciate (and inject) a component from a String ?