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

feat(upgrade): support $element in upgraded component template/templateUrl functions #31637

Conversation

@bamblack
Copy link
Contributor

commented Jul 18, 2019

Template functions on upgraded components will receive $element

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
    • I modified an existing one that verified that both $element and $attrs were undefined; it now verifies that $element is defined and $attrs is undefined
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #31565

What is the new behavior?

template and templateUrl functions on upgraded components will receive $element via UpgradeHelper.compileTemplate.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@gkalpak
Copy link
Member

left a comment

Thx, @bamblack! I left a couple minor comments, but generally lgtm 👍

packages/upgrade/src/common/src/upgrade_helper.ts Outdated Show resolved Hide resolved
packages/upgrade/src/common/src/upgrade_helper.ts Outdated Show resolved Hide resolved
@gkalpak
Copy link
Member

left a comment

One minor suggetion. LGTM otherwise 👍
@bamblack, can you also squash the commits together, since they are essentially all related to the same change.

packages/upgrade/src/common/src/upgrade_helper.ts Outdated Show resolved Hide resolved

@bamblack bamblack force-pushed the bamblack:compile-upgraded-component-template-with-element branch from bcfd3e4 to 6be8e4a Jul 23, 2019

@bamblack

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2019

Done and done.

@bamblack bamblack changed the title feat(upgrade): support $element in upgraded component template function feat(upgrade): support $element in upgraded component template/templateUrl functions Jul 23, 2019

@ngbot

This comment has been minimized.

Copy link

commented Jul 23, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: test_docs_examples_ivy" is failing
    pending status "google3" is pending
    pending missing required status "ci/circleci: publish_snapshot"
    pending 1 pending code review

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@gkalpak
Copy link
Member

left a comment

Awesome! Thx, @bamblack 👍

@mhevery

This comment has been minimized.

Copy link
Member

commented Jul 24, 2019

@mhevery mhevery closed this in 29e1c53 Jul 24, 2019

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.