https://github.com/angular/angular
Revision 07c1ddc48775967190b9c50530bae20c97140c0f authored by Kristiyan Kostadinov on 12 June 2021, 06:36:00 UTC, committed by Dylan Hunn on 17 June 2021, 18:11:53 UTC
This is something I ran into while working on a fix for the `TestBed` module teardown behavior for #18831. In the `RouterInitializer.appInitializer` we have a callback to the `LOCATION_INITIALIZED` which has to do some DI lookups. The problem is that if the module is destroyed before the location promise resolves, the `Injector.get` calls will fail. This is unlikely to happen in a real app, but it'll show up in unit tests once the test module teardown behavior is fixed.

PR Close #42560
1 parent 166e98a
History
Tip revision: 07c1ddc48775967190b9c50530bae20c97140c0f authored by Kristiyan Kostadinov on 12 June 2021, 06:36:00 UTC
fix(router): error if module is destroyed before location is initialized (#42560)
Tip revision: 07c1ddc
File Mode Size
.circleci
.devcontainer
.github
.husky
.ng-dev
.vscode
.yarn
aio
dev-infra
docs
goldens
integration
modules
packages
scripts
third_party
tools
.bazelignore -rw-r--r-- 4.2 KB
.bazelrc -rw-r--r-- 6.4 KB
.bazelversion -rw-r--r-- 213 bytes
.clang-format -rw-r--r-- 73 bytes
.editorconfig -rw-r--r-- 245 bytes
.gitattributes -rw-r--r-- 314 bytes
.gitignore -rw-r--r-- 843 bytes
.gitmessage -rw-r--r-- 7.2 KB
.mailmap -rw-r--r-- 51 bytes
.npmrc -rw-r--r-- 21 bytes
.nvmrc -rw-r--r-- 8 bytes
.prettierrc -rw-r--r-- 157 bytes
.pullapprove.yml -rw-r--r-- 47.3 KB
.yarnrc -rw-r--r-- 130 bytes
BUILD.bazel -rw-r--r-- 2.0 KB
CHANGELOG.md -rw-r--r-- 890.3 KB
CODE_OF_CONDUCT.md -rw-r--r-- 1.1 KB
CONTRIBUTING.md -rw-r--r-- 15.5 KB
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 4.7 KB
WORKSPACE -rw-r--r-- 1.9 KB
browser-providers.conf.js -rw-r--r-- 8.4 KB
gulpfile.js -rw-r--r-- 812 bytes
karma-js.conf.js -rw-r--r-- 8.0 KB
package.json -rw-r--r-- 8.5 KB
renovate.json -rw-r--r-- 2.7 KB
test-events.js -rw-r--r-- 259 bytes
test-main.js -rw-r--r-- 9.4 KB
tslint.json -rw-r--r-- 2.8 KB
yarn.lock -rw-r--r-- 615.5 KB
yarn.lock.readme.md -rw-r--r-- 1.3 KB

README.md

back to top