angular-docs-cn/packages/core
Kristiyan Kostadinov 8628826535 fix(core): incorrect error reported when trying to re-create view which had an error during creation (#43005)
Currently if a view throws an error during creation mode, we mark it as `incompleteFirstPass` so that we can try to recover later. The recovery is only possible inside component views.

The problem is that when this was introduced, I forgot to flip the `firstCreatePass` when an error is thrown which meant that calling `renderView` on the same component again is allowed. It will eventually hit an assertion which can be confusing for the end user. This issue only manifests itself when rendering views "manually" through `ViewContainerRef` (e.g. using `NgIf`).

These changes flip the `firstCreatePass` back to false on errors so that trying to re-render the same view will throw an error which is consistent to the one that broke the view during creation.

Fixes #41383.

PR Close #43005
2021-08-04 08:58: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): incorrect error reported when trying to re-create view which had an error during creation (#43005) 2021-08-04 08:58:28 -07:00
test fix(core): incorrect error reported when trying to re-create view which had an error during creation (#43005) 2021-08-04 08:58: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: wire up new CLDR generation tool within Bazel (#42230) 2021-07-16 12:44:59 -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 refactor(core): update peerDependencies to allow rxjs7 (#42991) 2021-08-02 13:55:01 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00