New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Signal within Image onload event fails with NG0600 error #55461
Comments
Could you please share a reproduction scenario in a stackblitz? It is not clear when the |
@pkozlowski-opensource here you go: it works when not running in the test. it fails when running the test. |
This is because your test resolves the image loading synchronously which means that your onload event handler runs as part of the effect defined in the constructor. In this sense your test and production code behave differently. You've got several options to address the warning:
Idle though - it would help debugging those scenarios if we could easily / quickly identify an effect that triggers a warning. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
Hey y'all
I am currently trying to run tests against my image crop component. There, I have the following method:
the
createHtmlImg
function looks like this:Does someone know, why the issue below happens?
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: