You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ERROR RuntimeError: NG0318: '<input>' is an invalid control host. The host must be a native form control (such as <input>', '<select>', or '<textarea>') or a custom form control component with a 'value' or 'checked' model. #64362
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
Yes
Description
Upgrading from 21.0.0-next.5 to 21.0.0-next.6 results in runtime errors when using signal forms. Previously working forms are throwing the following error:
ERROR RuntimeError: NG0318: '<input>' is an invalid control host. The host must be a native form control (such as <input>', '<select>', or '<textarea>') or a custom form control component with a 'value' or 'checked' model.
Either the implementation or the error message contains a mistake, because input is a native form control.
ERROR RuntimeError: NG0318: '<input>' is an invalid control host. The host must be a native form control (such as <input>', '<select>', or '<textarea>') or a custom form control component with a 'value' or 'checked' model.
Please provide the environment you discovered this bug in (run ng version)
The culprit is a directive that's added on the input with the signal control.
When ViewContainerRef is injected within the directive, then the problem occurs.
Activity
JeanMeche commentedon Oct 11, 2025
Could you please provide a minimal repro of this ? I couldn't reproduce it with the example you give and the
next.7version.timdeschryver commentedon Oct 11, 2025
@JeanMeche of course, sorry my laziness 😅
Here's a simple repo that has the same error, https://github.com/timdeschryver/signal-forms-repro
The culprit is a directive that's added on the input with the signal control.
When
ViewContainerRefis injected within the directive, then the problem occurs.JeanMeche commentedon Oct 11, 2025
Cool, thanks for the repro.
So yeah the minimal repro is following:
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
fix(core): control not recognized when input has directive injecting …
DuncanFaulkner commentedon Oct 17, 2025
this was working on 21.0.0-next.6 but was broken in next.7 and next.8 (next.9 of Material)
JeanMeche commentedon Oct 17, 2025
@DuncanFaulkner can you open a new issue with a stackblitz repro. The issue mentioned by OP has been fixed.
angular-automatic-lock-bot commentedon Nov 17, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.