GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(upgrade): more closely align `UpgradeModule#bootstrap()` with `angular.bootstrap()` by gkalpak · Pull Request #46214 · angular/angular

Conversation

@gkalpak

@gkalpak gkalpak commented Jun 1, 2022

Copy link
Copy Markdown
Member

Previously, UpgradeModule#bootstrap(), while being a replacement for and accepting the same arguments as angular.bootstrap(), did not return the same value as angular.bootstrap() (i.e. the AngularJS injector in most cases). This made it less straight forward to migrate some usecases that relied on the return value of .bootstrap(). The work-around was to access the injector via UpgradeModule#$injector (after the app had been bootstrapped with UpgradeModule#bootstrap()).

This commit addresses this by ensuring UpgradeModule#bootstrap() returns the same value as angular.bootstrap(), making it easier to replace the latter with the former.

Fixes #46211.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gkalpak gkalpak added type: bug/fix area: upgrade Issues related to AngularJS → Angular upgrade APIs target: minor This PR is targeted for the next minor release labels Jun 1, 2022
@ngbot ngbot Bot modified the milestone: Backlog Jun 1, 2022
@gkalpak gkalpak changed the title fix(upgrade): more closely align UpgradeModule#bootstrap() with angular.bootstrap() feat(upgrade): more closely align UpgradeModule#bootstrap() with angular.bootstrap() Jun 1, 2022
@gkalpak
gkalpak force-pushed the fix-upgrade-bootstrap branch from 9d850dd to 22085c3 Compare June 1, 2022 20:09
@mary-poppins

mary-poppins commented Jun 1, 2022

Copy link
Copy Markdown

You can preview 22085c3 at https://pr46214-22085c3.ngbuilds.io/.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gkalpak
gkalpak force-pushed the fix-upgrade-bootstrap branch from 22085c3 to c16a2d6 Compare June 2, 2022 10:44
gkalpak added 2 commits June 2, 2022 13:45
@gkalpak
test(upgrade): add some tests for UpgradeModule
6bfb0bc
Add some tests for the `UpgradeModule` class and its members.
@gkalpak
feat(upgrade): more closely align UpgradeModule#bootstrap() with `a…
c16a2d6
…ngular.bootstrap()`

Previously, [UpgradeModule#bootstrap()][1], while being a replacement
for and accepting the same arguments as [angular.bootstrap()][2], did
not return the same value as `angular.bootstrap()` (i.e. the AngularJS
injector in most cases). This made it less straight forward to migrate
some usecases that relied on the return value of `.bootstrap()`. The
work-around was to access the injector via [UpgradeModule#$injector][3]
(after the app had been bootstrapped with `UpgradeModule#bootstrap()`).

This commit addresses this by ensuring `UpgradeModule#bootstrap()`
returns the same value as `angular.bootstrap()`, making it easier to
replace the latter with the former.

[1]: https://angular.io/api/upgrade/static/UpgradeModule#bootstrap
[2]: https://docs.angularjs.org/api/ng/function/angular.bootstrap
[3]: https://angular.io/api/upgrade/static/UpgradeModule#%24injector

Fixes angular#46211
@mary-poppins

mary-poppins commented Jun 2, 2022

Copy link
Copy Markdown

You can preview c16a2d6 at https://pr46214-c16a2d6.ngbuilds.io/.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gkalpak
gkalpak marked this pull request as ready for review June 2, 2022 11:05
@gkalpak gkalpak added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jun 2, 2022
@pullapprove
pullapprove Bot requested review from alxhub, jessicajaniuk and pkozlowski-opensource June 2, 2022 11:05
AndrewKushnir
AndrewKushnir approved these changes Jun 2, 2022
View reviewed changes
AndrewKushnir
AndrewKushnir approved these changes Jun 2, 2022
View reviewed changes

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jessicajaniuk
jessicajaniuk approved these changes Jun 2, 2022
View reviewed changes

@jessicajaniuk jessicajaniuk left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

reviewed-for: fw-upgrade, public-api

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jessicajaniuk
jessicajaniuk removed request for alxhub and pkozlowski-opensource June 2, 2022 19:41
@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 3, 2022
@alxhub

alxhub commented Jun 3, 2022

Copy link
Copy Markdown
Member

This PR was merged into the repository by commit e9cb045.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alxhub alxhub closed this in 4e5e312 Jun 3, 2022
alxhub pushed a commit that referenced this pull request Jun 3, 2022
@gkalpak @alxhub
feat(upgrade): more closely align UpgradeModule#bootstrap() with `a…
e9cb045
…ngular.bootstrap()` (#46214)

Previously, [UpgradeModule#bootstrap()][1], while being a replacement
for and accepting the same arguments as [angular.bootstrap()][2], did
not return the same value as `angular.bootstrap()` (i.e. the AngularJS
injector in most cases). This made it less straight forward to migrate
some usecases that relied on the return value of `.bootstrap()`. The
work-around was to access the injector via [UpgradeModule#$injector][3]
(after the app had been bootstrapped with `UpgradeModule#bootstrap()`).

This commit addresses this by ensuring `UpgradeModule#bootstrap()`
returns the same value as `angular.bootstrap()`, making it easier to
replace the latter with the former.

[1]: https://angular.io/api/upgrade/static/UpgradeModule#bootstrap
[2]: https://docs.angularjs.org/api/ng/function/angular.bootstrap
[3]: https://angular.io/api/upgrade/static/UpgradeModule#%24injector

Fixes #46211

PR Close #46214
@gkalpak
gkalpak deleted the fix-upgrade-bootstrap branch June 6, 2022 18:51
@angular-automatic-lock-bot

angular-automatic-lock-bot Bot commented Jul 7, 2022

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@AndrewKushnir AndrewKushnir AndrewKushnir approved these changes
+1 more reviewer
@jessicajaniuk jessicajaniuk jessicajaniuk approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

action: merge The PR is ready for merge by the caretaker area: upgrade Issues related to AngularJS → Angular upgrade APIs target: minor This PR is targeted for the next minor release type: bug/fix

Projects

None yet

Milestone

Backlog

Development

Successfully merging this pull request may close these issues.

'$locationShim': Not a valid '@angular/upgrade' application.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@gkalpak @mary-poppins @alxhub @AndrewKushnir @jessicajaniuk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.