Skip to content
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

Problem with nested projected content #47732

Open
YuliyaReut opened this issue Oct 11, 2022 · 2 comments
Open

Problem with nested projected content #47732

YuliyaReut opened this issue Oct 11, 2022 · 2 comments
Assignees
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

Comments

@YuliyaReut
Copy link

YuliyaReut commented Oct 11, 2022

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

@YuliyaReut YuliyaReut changed the title Problem with nested ng-content Problem with nested projected content Oct 11, 2022
@jessicajaniuk jessicajaniuk added the area: core Issues related to the framework runtime label Oct 11, 2022
@ngbot ngbot bot added this to the needsTriage milestone Oct 11, 2022
@montella1507
Copy link

#43946

Maybe related

@YuliyaReut
Copy link
Author

@montella1507 unfortunately I don't think so :(

@pkozlowski-opensource pkozlowski-opensource self-assigned this Oct 26, 2022
@alxhub alxhub added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Nov 16, 2022
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

5 participants