diff --git a/packages/core/src/render3/component_ref.ts b/packages/core/src/render3/component_ref.ts index 74c12cc8c8a..66afa098301 100644 --- a/packages/core/src/render3/component_ref.ts +++ b/packages/core/src/render3/component_ref.ts @@ -530,7 +530,7 @@ export class ComponentRef extends AbstractComponentRef { if (ngDevMode && !hasSetInput) { const cmpNameForError = stringifyForError(this.componentType); let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `; - message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`; + message += `Make sure that the '${name}' property is declared as an input using the @Input() decorator or the input() function.`; reportUnknownPropertyError(message); } } diff --git a/packages/core/test/render3/component_ref_spec.ts b/packages/core/test/render3/component_ref_spec.ts index 132bfb64e20..e8992a5d7ec 100644 --- a/packages/core/test/render3/component_ref_spec.ts +++ b/packages/core/test/render3/component_ref_spec.ts @@ -377,7 +377,7 @@ describe('ComponentFactory', () => { fixture.componentRef.setInput('doesNotExist', ''); const msgL1 = `NG0303: Can't set value of the 'doesNotExist' input on the 'NoInputsCmp' component. `; - const msgL2 = `Make sure that the 'doesNotExist' property is annotated with @Input() or a mapped @Input('doesNotExist') exists.`; + const msgL2 = `Make sure that the 'doesNotExist' property is declared as an input using the @Input() decorator or the input() function.`; expect(console.error).toHaveBeenCalledWith(msgL1 + msgL2); });