Components with a 'required' signalized input can not be dynamically created with createComponent #55071
Labels
area: core
Issues related to the framework runtime
core: dynamic view creation
core: reactivity
Work related to fine-grained reactivity in the core framework
cross-cutting: signals
Milestone
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Components with a 'required' signalized input can not be created with createComponent without triggering NG0950.
I guess the idea is that you should use the setInput method to set a value for the required input. But the problem is that there is no way to know what inputs are required or not. This is due to an input being required or not is not part of the ComponentMirror interface as previously reported #52117.
Having to know what inputs are required or not greatly limits the ability of createComponent to actually work as a dynamic component factory. As it stands right now only components without required signal inputs can be dynamically created.
Proposed solution
I see two solutions to this:
Alternatives considered
The alternative is that you can not use signal inputs and stick with the old way.
The text was updated successfully, but these errors were encountered: