-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change in Ivy data binding! #39044
Comments
This looks to be the same as #34227. |
@JoostK It is! I apologize, I tried to search for it, it's just soo confusing. That's why my title is like this. Couldn't fit it into a sentence. Please mark as duplicate if you choose to. PS: The issue is still very much urgent, and breaks lots of things for us as well. |
Closing this ticket as a duplicate of #34227. |
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
Ivy - I'm not familiar with the exact package / packages.
Is this a regression?
Could not answer. We went from Angular
7.2.9
to9.1.12
over a few days, and we used the default "staticness" of our@ViewChild
queries before. Through the updates we had to switch some queries over to{ static: true }
because errors arose.Description
As you know, there are multiple ways to bind to a string Input property. I'll mention two of them;
a.)
someProperty="Some static string..."
聽聽聽聽Which will only bind once.
b.)
[someProperty]="'Some string...'"
聽聽聽聽Which will participate in change detection as usual, and the string can change.
Without Ivy, these two ways pretty much perform the same. Note: We are talking about non-changing (at least through template binding) string values.
We have multiple systems in which we may override these provided strings in code, hence why we use the first type of binding (a). These systems seem to silently fail with Ivy on. After lots of debugging I figured that Ivy handles something differently. I'm pretty sure that the issue seems to arise from the combination of static resolution, binding type (a), and the override's timing, however these issues are incredibly hard to detect, and would even require complete redesigns of some of our systems.
In my attached StackBlitz, I've prepared;
馃敩 Minimal Reproduction
StackBlitz, second example, turn Ivy on / off
馃敟 Exception or Error
None
馃實 Your Environment
Angular Version:
Anything else relevant?
Tested on Google Chrome 85.0.4183.121 (Official Build) (64-bit)
Production mode seems not to influence it.
I realize what we're doing is not recommended, and that the example may not make much sense to you. But I firmly think it should be supported, and that the difference of behaviour should at least be documented (if it's not a bug). Furthermore, the cases in which we do this predominantly make sense, I just can't share much more.
The text was updated successfully, but these errors were encountered: