-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: dicore: host directivesstate: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
I was trying to use formControlName is a nested component which requires:
viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }],Because formControlName injects parent formGroup directive with @Host decorator. But I noticed that it stops working as soon as one host directive on the component has any provider.
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
RuntimeError: NG01050: formControlName must be used with a parent formGroup directive
Please provide the environment you discovered this bug in (run ng version)
20
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: dicore: host directivesstate: has PR