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

Components/Content projection: Wrong selector used in the live example for the usage of "ngProjectAs" #42522

Closed
CrazyMachine2 opened this issue Jun 8, 2021 · 2 comments
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Milestone

Comments

@CrazyMachine2
Copy link

Docs or angular.io Bug Report

Description

Inside the live-example used in Content projection guide, the"ngProjectAs" selector doesn't match the one specified on the component's ng-content.

Check screenshots for the current behavior.

Minimal Reproduction

.

What's the affected URL?**

https://angular.io/guide/content-projection
https://stackblitz.com/angular/nkaxvprrnko

Expected behavior

The ngProjectAs selector should match the selector specified on the ng-content inside zippy-ngprojectas.component.ts, or vice versa.

Screenshot

zippy-ngprojectas.component.ts

image

app.component.html

image

@ngbot ngbot bot added this to the needsTriage milestone Jun 8, 2021
@petebacondarwin
Copy link
Member

Great spot @CrazyMachine2! This is a bug in the example as you point out. It was subtle since by not matching the selector the "question" part of the content projection gets pulled in as part of the default projection and so visually it is not obvious that this has not worked.

@petebacondarwin petebacondarwin added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 9, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 9, 2021
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Jun 9, 2021
petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Jun 9, 2021
@alxhub alxhub closed this as completed in e36c5b4 Jun 9, 2021
alxhub pushed a commit that referenced this issue Jun 9, 2021
@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 Jul 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants