-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Template and host context gets confused #12004
Comments
Just for the record - I'm not trying to find contrived cases here - this is happening in real projects and was originally reported in ng-bootstrap/ng-bootstrap#813 |
…pressions Fixes angular#12004 Closes angular#12071
…pressions Fixes angular#12004 Closes angular#12071
…pressions Fixes angular#12004 Closes angular#12071
…pressions Fixes angular#12004 Closes angular#12071
…pressions Fixes angular#12004 Closes angular#12071
…pressions Fixes angular#12004 Closes angular#12071
…pressions (angular#12396) Fixes angular#12004 Closes angular#12071
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. |
I'm submitting a ... (check one with "x")
Current behavior
When a directive:
ngFor
blockhost
binding with an non-constant expressionhost
uses a field with the same name as a variable declared in thengFor
blockthen the directives field is "shadowed" by a variable declared in the
ngFor
block.Expected behavior
Host bindings are evaluated against an appropriate context regardless if the directive is used inside
ngFor
block or not.Reproduction of the problem
https://plnkr.co/edit/AgysQsIPMd81W37ON5Ux?p=preview
Expected behavior:
foo
,bar
andbaz
are rendered with the red backgroundCurrent behavior:
foo
,bar
andbaz
are rendered without any backgroundThe text was updated successfully, but these errors were encountered: