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(compiler): not generating update instructions for ng-template inside alternate namespaces #41669

Closed

Conversation

crisbeto
Copy link
Member

We have a check that determines whether to generate property binding instructions for an ng-template. The check looks at whether the tag name is exactly ng-template, but the problem is that if the tag is placed in a non-HTML namespace (e.g. svg), the tag name will actually be :namespace:ng-template and the check will fail.

These changes resolve the issue by looking at the tag name without the namespace.

Fixes #41308.

…ide alternate namespaces

We have a check that determines whether to generate property binding instructions for an `ng-template`. The check looks at whether the tag name is exactly `ng-template`, but the problem is that if the tag is placed in a non-HTML namespace (e.g. `svg`), the tag name will actually be `:namespace:ng-template` and the check will fail.

These changes resolve the issue by looking at the tag name without the namespace.

Fixes angular#41308.
@google-cla google-cla bot added the cla: yes label Apr 17, 2021
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate labels Apr 17, 2021
@ngbot ngbot bot added this to the Backlog milestone Apr 17, 2021
@crisbeto crisbeto marked this pull request as ready for review April 17, 2021 09:49
@ngbot ngbot bot modified the milestone: Backlog Apr 17, 2021
@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 19, 2021
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crisbeto thanks for the fix 👍

@AndrewKushnir
Copy link
Contributor

Presubmit.

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Apr 20, 2021
@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Apr 20, 2021
AndrewKushnir pushed a commit that referenced this pull request Apr 20, 2021
…ide alternate namespaces (#41669)

We have a check that determines whether to generate property binding instructions for an `ng-template`. The check looks at whether the tag name is exactly `ng-template`, but the problem is that if the tag is placed in a non-HTML namespace (e.g. `svg`), the tag name will actually be `:namespace:ng-template` and the check will fail.

These changes resolve the issue by looking at the tag name without the namespace.

Fixes #41308.

PR Close #41669
@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 May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler cla: yes target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<ng-template> with [ngIf] does not render SVG content
2 participants