Problem with nested projected content #47732
Labels
area: core
Issues related to the framework runtime
core: content projection
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
I have a child component(TabItemComponent).
In a parent component(TabsComponent) I display items(as projected content) with using ngTemplateOutlet and don't use
<ng-content>
.I want to create some wrapper (like TabsWrapperComponent) and put there TabsComponent and in this component puts some items which will be there always, and after that use TabsWrapperComponent instead of TabsComponent in which I can pass as a projected content other items if they are.
The problem is TabsComponent can't find ContentChildren if they are passed across projected content to TabsComponent in TabsWrapperComponent.
In a test app only headers items show , but the panel items should too
I also tried to do it not with template variable, but with directive. It is strange behavior, that angular component can't find ComponentChildren by directive if directive is applied, because the projected content to the wrapper above TabsComponent it is also projected content to TabsComponent
The problem is here
How I handle it is here
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-ivy-8pssex?file=src/app/app.component.html
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: