angular-cn/packages/core/test/acceptance
Kara Erickson 9b93bd625f fix(ivy): ensure views created in constructors dont break queries (#29983)
Previous to this change, we assumed embedded views could only be created after
their parent template node had completed processing. As a result, we only set
up query logic for containers after directives on the node were created.
However, this assumption didn't take into account the case where a directive
on a template node could create views in its constructor.

This commit fixes query logic to work with views created in constructors.
In that case, we need to create a query container before the new view is
rendered so query results in the view aren't lost. But since the query container
is created before directives have completed processing, we also have to ensure
that query results gathered later on the template node are inserted before that
query container. Otherwise, query results in embedded views will clobber query
results on template nodes.

This splice mode may be slightly slower than the normal matching for queries on
containers, but we should only fall back to this strategy in the edge case where
views are created in constructors. (We should encourage developers to create
views in ngOnInit instead).

PR Close #29983
2019-04-19 10:01:32 -07:00
..
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
change_detection_spec.ts fix(ivy): should mark OnPush ancestor of dynamically created views as dirty (#28687) 2019-02-13 12:12:45 -08:00
component_spec.ts fix(ivy): component destroy hook called twice when configured as provider (#28470) 2019-02-21 09:34:26 -08:00
content_spec.ts perf(ivy): avoid storing raw selectors in projectionDef (#29578) 2019-04-11 08:09:09 -07:00
di_spec.ts fix(ivy): ChangeDetectorRef should be injectable on ng-container (#29424) 2019-03-20 15:14:21 -04:00
directive_spec.ts fix(ivy): keep i18n-annotated attributes in element attribute list (#29856) 2019-04-12 16:57:42 -07:00
exports_spec.ts fix(ivy): avoid innerHTML usage in exports test (to make it work in IE11) (#29127) 2019-03-05 21:08:08 -08:00
inherit_definition_feature_spec.ts fix(ivy): ngOnChanges hooks should be inherited from grand-superclasses (#28888) 2019-02-22 12:00:15 -08:00
integration_spec.ts fix(ivy): host attributes and @COmponentChild should be supported on the same component (#29565) 2019-03-29 10:49:35 -07:00
lifecycle_spec.ts fix(ivy): support property values changed in ngOnChanges (forward rref case) (#29054) 2019-03-05 14:27:08 -08:00
listener_spec.ts fix(ivy): properly coalesce event handler in presence of queries (#29957) 2019-04-17 12:20:00 -07:00
pipe_spec.ts fix(ivy): compile pipe in context of ternary operator (#28635) 2019-02-11 14:52:13 -08:00
properties_spec.ts fixup! fix(ivy): incorrectly remapping certain properties that refer to inputs (#28765) 2019-02-21 17:59:50 -08:00
providers_spec.ts fix(ivy): directiveInject should fall back to inject (#29948) 2019-04-16 19:31:46 -07:00
query_spec.ts fix(ivy): generate empty QueryList for root component content queries (#29514) 2019-03-26 12:45:21 -07:00
styling_spec.ts fix(ivy): ensure parent/sub-class components evaluate styling correctly (#29602) 2019-04-05 16:49:52 -07:00
template_ref_spec.ts fix(ivy): ViewRef.rootNodes not including projected nodes (#28951) 2019-02-26 10:49:01 -08:00
view_container_ref_spec.ts fix(ivy): ensure views created in constructors dont break queries (#29983) 2019-04-19 10:01:32 -07:00
view_ref_spec.ts test(ivy): fix failing view ref test (#29178) 2019-03-07 18:56:22 -08:00