angular-cn/packages/core
JoostK cd2d82a91a fix(core): associate the NgModule scope for an overridden component (#42817)
When using `TestBed.overrideComponent`, the overridden component would
incorrectly lose access to its NgModule's declaration scope if the
NgModule had been imported into the testing NgModule as a
`ModuleWithProviders`, e.g. using a `forRoot` call.

The issue occurred as the `TestBed` compiler did not consider NgModules
that had been imported as a `ModuleWithProviders` when associating
NgModules with component overrides. This caused the overridden component
to be compiled standalone, meaning that it does not have access to
its NgModule's declarations. This commit extends the logic for
traversing the NgModule graph to also consider `ModuleWithProviders`
imports.

Fixes #42734

PR Close #42817
2021-07-13 15:59:28 -07:00
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
src fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function (#42692) 2021-07-13 14:08:05 -07:00
test fix(core): associate the NgModule scope for an overridden component (#42817) 2021-07-13 15:59:28 -07:00
testing fix(core): associate the NgModule scope for an overridden component (#42817) 2021-07-13 15:59:28 -07:00
BUILD.bazel build: update API goldens to reflect new tool (#42688) 2021-06-30 11:43:48 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00