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
[Ivy] ExpressionChangedAfterItHasBeenCheckedError when using bypassSecurityTrustStyle in a property getter #33448
Comments
I was able to repro this with rc.1. Oddly enough the error occurs with:
But not with:
This makes sense because the getter creates a new Safe value every time it's called. With VE ( |
I looked into this more and the behavior of VE is that if a bound value is of SafeStyle type we don't throw ExpressionChangedAfterItHasBeenCheckedError regardless of the contents of the SafeStyle values. I don't think that this is ideal (we should really compare the wrapped value), but a good first step should be to match VE in this behavior and treat all SafeStyle values as equal for the purposes of ExpressionChangedAfterItHasBeenCheckedError. |
Isn't this expected though? This getter generates new object each change detection cycle. So when dev mode performs extra check — it does get a new object. Why wasn't it present with VE? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Affected Package
The issue is caused by package @angular/coreIs this a regression?
Yes, it works in non-ivy modeDescription
A clear and concise description of the problem...🔬 Minimal Reproduction
https://github.com/fr0/angular-ivy-test2
npm install
ng serve
🔥 Exception or Error
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: