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): provide an ability to match <ng-template> tags #27636

Closed

Conversation

AndrewKushnir
Copy link
Contributor

Prior to this change, we were unable to match directives using ng-template tags (for example the following selector would not work even though there might be some s in a template: ng-template[directiveA]. As a result, that broke some components that relies on such selectors to work. In order to resolve the problem, we now pass tag name to the template instruction (where we passed null before) and this tag name is used for matching at runtime. This update should also help support projecting containers, because the tag name is required to properly match such elements.

Issue Number: FW-818.

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release comp: ivy labels Dec 12, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 12, 2018
@mary-poppins
Copy link

You can preview 3b74ade at https://pr27636-3b74ade.ngbuilds.io/.

@angular angular deleted a comment from mary-poppins Dec 13, 2018
@angular angular deleted a comment from mary-poppins Dec 13, 2018
@mary-poppins
Copy link

You can preview 7d7d158 at https://pr27636-7d7d158.ngbuilds.io/.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

Looks good to me, just some nits

packages/core/test/render3/integration_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/directive_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/directive_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/directive_spec.ts Outdated Show resolved Hide resolved
packages/core/test/render3/directive_spec.ts Outdated Show resolved Hide resolved
@kara kara added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 14, 2018
Prior to this change, we were unable to match directives using `ng-template` tags (for example the following selector would not work even though there might be some <ng-template>s in a template: `ng-template[directiveA]`. As a result, that broke some components that relies on such selectors to work. In order to resolve the problem, we now pass tag name to the `template` instruction (where we passed `null` before) and this tag name is used for matching at runtime. This update should also help support projecting containers, because the tag name is required to properly match such elements.
@mary-poppins
Copy link

You can preview dcbf47a at https://pr27636-dcbf47a.ngbuilds.io/.

@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented Dec 15, 2018

Thanks you for the review @kara! I've applied the necessary changes and will set this PR to "ready for merge" once all tests are completed. Thank you.

@AndrewKushnir
Copy link
Contributor Author

Presubmit

@mary-poppins
Copy link

You can preview d23e575 at https://pr27636-d23e575.ngbuilds.io/.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 15, 2018
@mhevery mhevery closed this in dfbf6d7 Dec 17, 2018
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
Prior to this change, we were unable to match directives using `ng-template` tags (for example the following selector would not work even though there might be some <ng-template>s in a template: `ng-template[directiveA]`. As a result, that broke some components that relies on such selectors to work. In order to resolve the problem, we now pass tag name to the `template` instruction (where we passed `null` before) and this tag name is used for matching at runtime. This update should also help support projecting containers, because the tag name is required to properly match such elements.

PR Close angular#27636
@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 Sep 14, 2019
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 cla: yes target: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants