Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Content projection for multiple contents using custom HTML elements needs a schema #61202

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

Open
syzgod opened this issue May 8, 2025 · 2 comments

Comments

@syzgod
Copy link

syzgod commented May 8, 2025

Describe the problem that you experienced

In the Docs it shows us how to do the content projection for multiple elements but it won't render and give us an error because the schema CUSTOM_ELEMENTS_SCHEMA needs to be added to the @component. It is sadly however not mentioned in the Docs on that page. While it can be found in the Docs would be nice if it is specifically stated on the content projection page especially if the examples require the schema.

Enter the URL of the topic with the problem

https://angular.dev/guide/components/content-projection

Describe what you were looking for in the documentation

I was looking for content projection with ng-content for multiple contents but it didn't render with the examples due to the missing schema and it is not mentioned on that page.

Describe the actions that led you to experience the problem

Followed the Docs.

Describe what you want to experience that would fix the problem

To mention the schema on that page.

Error message

Image

@syzgod syzgod changed the title Using custom HTML elements with dash selectors needs a Schema Content projection for multiple contents using custom HTML elements needs a schema May 8, 2025
@JeanMeche
Copy link
Member

This is a general issue with custom elements (see #12045). I don't think it needs a specific callout for content projection.

@syzgod
Copy link
Author

syzgod commented May 8, 2025

This is a general issue with custom elements (see #12045). I don't think it needs a specific callout for content projection.

Thank you. Didn't see that. However it is still not mentioned in the Docs and they use them as an example while it won't work without the Schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants