angular-docs-cn/packages/core/test/acceptance
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
..
BUILD.bazel refactor(core): add debug ranges to `LViewDebug` with matchers (#38359) 2020-08-06 16:58:11 -07:00
attributes_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
bootstrap_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
change_detection_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
change_detection_transplanted_view_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
common_integration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
component_spec.ts Revert "perf(core): avoid storing LView in __ngContext__ (#41358)" (#41901) 2021-04-30 14:12:52 -07:00
content_spec.ts docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
copy_definition_feature_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
debug_spec.ts Revert "perf(core): avoid storing LView in __ngContext__ (#41358)" (#41901) 2021-04-30 14:12:52 -07:00
di_spec.ts fix(core): use correct injector when resolving DI tokens from within a directive provider factory (#42886) 2021-07-19 17:36:29 -07:00
directive_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
discover_utils_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
embedded_views_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
exports_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
host_binding_spec.ts fix(compiler): incorrectly interpreting some HostBinding names (#40233) 2021-01-07 13:15:46 -08:00
i18n_spec.ts fix(core): handle multiple i18n attributes with expression bindings (#41882) 2021-04-30 14:20:15 -07:00
inherit_definition_feature_spec.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
integration_spec.ts feat(compiler): support number separators in templates (#42672) 2021-06-30 10:36:15 -07:00
lifecycle_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
listener_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
ng_module_spec.ts refactor(compiler): move factory out of injector definition (#41022) 2021-03-08 15:31:30 -08:00
ngdevmode_debug_spec.ts Revert "perf(core): avoid storing LView in __ngContext__ (#41358)" (#41901) 2021-04-30 14:12:52 -07:00
ngmodule_scope_spec.ts fix(core): prevent NgModule scope being overwritten in JIT compiler (#37795) 2020-08-11 09:50:27 -07:00
outputs_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
pipe_spec.ts fix(compiler): evaluate safe navigation expressions in correct binding order (#37911) 2020-08-11 09:51:10 -07:00
profiler_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
property_binding_spec.ts refactor(core): update peerDependencies to allow rxjs7 (#42991) 2021-08-02 13:55:01 -07:00
property_interpolation_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
providers_spec.ts refactor(compiler): implement `ngDeclareInjectable()` (#41316) 2021-04-07 13:57:13 -07:00
pure_function_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
query_spec.ts fix(core): Switch `emitDistinctChangesOnlyDefaultValue` to true (#41121) 2021-03-12 10:47:56 -08:00
renderer_factory_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router_integration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
security_spec.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
styling_spec.ts fix(compiler): handle case-sensitive CSS custom properties (#41380) 2021-03-30 16:57:44 -07:00
template_ref_spec.ts fix(core): allow EmbeddedViewRef context to be updated (#40360) 2021-02-23 08:14:01 -08:00
text_spec.ts fix(compiler): handle strings inside bindings that contain binding characters (#39826) 2020-12-10 11:11:21 -08:00
view_container_ref_spec.ts feat(core): add opt-in test module teardown configuration (#42566) 2021-06-17 18:03:47 +00:00
view_insertion_spec.ts 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
view_ref_spec.ts fix(core): memory leak if view container host view is destroyed while view ref is not (#40219) 2021-01-08 09:45:12 -08:00