fix(ivy): queries should match elements inside ng-container with the descendants: false option (#35384)
Before this change content queries with the `descendants: false` option, as implemented in ivy, would not descendinto `<ng-container>` elements. This behaviour was different from the way the View Engine worked. This change alligns ngIvy and VE behaviours when it comes to queries and the `<ng-container>` elements and fixes a common bugs where a query target was placed inside the `<ng-container>` element with a * directive on it. Before: ```html <needs-target> <ng-container *ngIf="condition"> <div #target>...</div> <!-- this node would NOT match --> </ng-container> </needs-target> ``` After: ```html <needs-target> <ng-container *ngIf="condition"> <div #target>...</div> <!-- this node WILL match --> </ng-container> </needs-target> ``` Fixes #34768 PR Close #35384
This commit is contained in:

committed by
Alex Rickabaugh

parent
5fbfe6996a
commit
3f4e02b8c7
@ -26,4 +26,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user