Signal input is not recognized in component
SillyButt opened this issue · 1 comments
SillyButt commented
Is this a regression?
No
Description
Problem
I'm not able to test signal inputs with components. It's weird because I do exactly what docs does, I tried changing versions
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
: NG0303: Can't set value of the 'title' input on the 'HeaderComponent' component. Make sure that the 'title' property is annotated with @Input() or a mapped @Input('title') exists.
Please provide the environment you discovered this bug in
Node: 22
Versions:
"@angular/common": "17.3.3", // Also tried latest 17 version for all packages which is 17.3.11
"@angular/compiler": "17.3.3",
"@angular/core": "17.3.3",
"@angular/platform-browser": "17.3.3",
"@angular/platform-browser-dynamic": "17.3.3",
"@ngneat/spectator": "~17.1.0", // tried "18.0.0" too
Anything else?
There was the same issue for another guy but he managed to "fix" this by setting "detectChanges: false", which didn't fix it for me.
Similar issue: #656
Do you want to create a pull request?
No
SillyButt commented
If whoever falls into this issue too, I managed to find the solution:
Make sure that jest-preset-angular
is updated accordingly to support signals (at least 14.0.1
): https://github.com/thymikee/jest-preset-angular/blob/main/CHANGELOG.md