◐ Shell
clean mode source ↗

feat(upgrade): more closely align `UpgradeModule#bootstrap()` with `angular.bootstrap()` by gkalpak · Pull Request #46214 · angular/angular

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.