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

Improve ng-content #53736

Closed
sedrac-calupeteca opened this issue Jan 1, 2024 · 5 comments
Closed

Improve ng-content #53736

sedrac-calupeteca opened this issue Jan 1, 2024 · 5 comments
Labels
area: core Issues related to the framework runtime core: content projection needs reproduction This issue needs a reproduction in order for the team to investigate further
Milestone

Comments

@sedrac-calupeteca
Copy link

Which @angular/* package(s) are relevant/related to the feature request?

No response

Description

ng-content is not reliable to use when working with multiple slots. As an example, if I have a template with three ng-content and each one has its own selector identifier and when I call this template and indicate the identifiers of each selector and its contents, all content will always be inserted in the last ng-content.

Proposed solution

Improving the functioning of NG-Content

Alternatives considered

I have nothing to suggest

@sedrac-calupeteca sedrac-calupeteca changed the title Melhorar o ng-content Improve ng-content Jan 1, 2024
@JeanMeche
Copy link
Member

Hi, could you share a stackblitz repro of the issue you're talking about ?

@JeanMeche JeanMeche added needs reproduction This issue needs a reproduction in order for the team to investigate further area: core Issues related to the framework runtime core: content projection labels Jan 1, 2024
@ngbot ngbot bot modified the milestone: Backlog Jan 1, 2024
@spock123
Copy link

spock123 commented Jan 1, 2024

@sedrac-calupeteca fwiw, I don't have any issues with this and I use it pretty extensively.

@sedrac-calupeteca
Copy link
Author

I was working on a project with angular (https://github.com/sedrac-slc/eimath_frontend.git) that uses this api made in Spring boot (https://github.com/sedrac-slc/eimath_backend.git)
I noticed a problem working with ng-content in the module that creates (src/app/template/dashboard) in your html I declared more than one ng-content with its selectors then
I imported the dashboard module defining all slots and only displays the last one declared.
In those days I did a simple project and the situation didn't happen, so I'm reviewing what could be causing the problem in this angular project

@alxhub
Copy link
Member

alxhub commented Feb 26, 2024

Closing as no reproduction was provided.

@alxhub alxhub closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime core: content projection needs reproduction This issue needs a reproduction in order for the team to investigate further
Projects
None yet
Development

No branches or pull requests

4 participants