-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimehotlist: error messages
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
When setting an input via ComponentRef.setInput()
, but the given input name is not available on the component, an error is thrown. But the error message seems outdated, it only mentions the decorator-based @Input()
and ignores the input()
function. This can be confusing for new Angular developers who have never worked with the decorator-based inputs.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Error: NG0303: Can't set value of the 'inputName' input on the 'MyComponent' component.
Make sure that the 'inputName' property is annotated with @Input() or a mapped @Input('inputName') exists.
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 20.0.4
Node: 22.17.0
Package Manager: npm 11.4.2
OS: darwin arm64
Angular: 20.0.5
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2000.4
@angular-devkit/core 20.0.4
@angular-devkit/schematics 20.0.4
@angular/build 20.0.4
@angular/cdk 20.0.4
@angular/cli 20.0.4
@angular/material 20.0.4
@schematics/angular 20.0.4
rxjs 7.8.2
typescript 5.8.3
zone.js 0.15.1
Anything else?
Affected LOC:
message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`; |
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimehotlist: error messages