-
Notifications
You must be signed in to change notification settings - Fork 27k
feat(upgrade): more closely align UpgradeModule#bootstrap() with angular.bootstrap()
#46214
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
Conversation
angular.bootstrap()UpgradeModule#bootstrap() with angular.bootstrap()
9d850dd to
22085c3
Compare
|
You can preview 22085c3 at https://pr46214-22085c3.ngbuilds.io/. |
22085c3 to
c16a2d6
Compare
Add some tests for the `UpgradeModule` class and its members.
…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
AndrewKushnir
left a comment
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
jessicajaniuk
left a comment
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
|
This PR was merged into the repository by commit 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
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 withUpgradeModule#bootstrap()).This commit addresses this by ensuring
UpgradeModule#bootstrap()returns the same value asangular.bootstrap(), making it easier to replace the latter with the former.Fixes #46211.