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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

bamblack
Copy link
Contributor

@bamblack bamblack 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

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

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 gkalpak added area: upgrade Issues related to AngularJS → Angular upgrade APIs state: WIP target: major This PR is targeted for the next major release feature Issue that requests a new feature labels Jul 21, 2019
@ngbot ngbot bot modified the milestone: needsTriage Jul 21, 2019
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

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
@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed state: WIP labels Jul 23, 2019
@ngbot
Copy link

ngbot bot 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.

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Awesome! Thx, @bamblack 👍

@mhevery
Copy link
Contributor

mhevery commented Jul 24, 2019

presubmit

@mhevery mhevery closed this in 29e1c53 Jul 24, 2019
sabeersulaiman pushed a commit to sabeersulaiman/angular that referenced this pull request Sep 6, 2019
@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 15, 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 area: upgrade Issues related to AngularJS → Angular upgrade APIs cla: yes feature Issue that requests a new feature target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants