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

fix(ivy): correctly support `ngProjectAs` on templates #34200

Closed

Conversation

@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Dec 2, 2019

Prior to this commit, if a template (for example, generated using structural directive such as *ngIf) contains ngProjectAs attribute, it was not included into attributes array in generated code and as a result, these templates were not matched at runtime during content projection. This commit adds the logic to append ngProjectAs values into corresponding element's attribute arrays, so content projection works as expected.

This PR resolves #34120.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No
Prior to this commit, if a template (for example, generated using structural directive such as *ngIf) contains `ngProjectAs` attribute, it was not included into attributes array in generated code and as a result, these templates were not matched at runtime during content projection. This commit adds the logic to append `ngProjectAs` values into corresponding element's attribute arrays, so content projection works as expected.
@ngbot ngbot bot modified the milestone: needsTriage Dec 2, 2019
@googlebot googlebot added the cla: yes label Dec 2, 2019
@AndrewKushnir AndrewKushnir marked this pull request as ready for review Dec 3, 2019
@AndrewKushnir AndrewKushnir requested review from angular/fw-compiler as code owners Dec 3, 2019
Copy link
Member

pkozlowski-opensource left a comment

LGTM overall from the runtime point of view, but left some nit comments that I would like to see resolved before this PR gets merged.

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Dec 3, 2019

Thanks for review @pkozlowski-opensource 👍 I've updated (simplified) tests based on your feedback.

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Dec 3, 2019

@alxhub
alxhub approved these changes Dec 3, 2019
@mhevery mhevery closed this in c50faa9 Dec 4, 2019
mhevery added a commit that referenced this pull request Dec 4, 2019
Prior to this commit, if a template (for example, generated using structural directive such as *ngIf) contains `ngProjectAs` attribute, it was not included into attributes array in generated code and as a result, these templates were not matched at runtime during content projection. This commit adds the logic to append `ngProjectAs` values into corresponding element's attribute arrays, so content projection works as expected.

PR Close #34200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.