angular-docs-cn/packages/core/test/linker
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
..
change_detection_integration_spec.ts test(ivy): ivy change detection doesn't descend into CD-detached view trees (#28680) 2019-02-13 12:12:26 -08:00
entry_components_integration_spec.ts test(ivy): ComponentFactoryResolver can resolve any component factory in Ivy (#28465) 2019-01-31 15:55:31 -05:00
inheritance_integration_spec.ts fix(ivy): proper component resolution in case of inheritance (#28439) 2019-02-05 23:29:04 -05:00
integration_spec.ts fix(ivy): not throwing error for unknown properties on container nodes (#29691) 2019-04-08 12:03:34 -07:00
jit_summaries_integration_spec.ts test(ivy): mark jit_summaries_integration_spec as obsolete in Ivy (#28027) 2019-01-09 15:38:48 -08:00
ng_container_integration_spec.ts feat(ivy): support i18n without closure (#28689) 2019-04-11 08:28:45 -07:00
ng_module_integration_spec.ts refactor(ivy): use ɵɵ instead of Δ for now (#29850) 2019-04-11 16:27:56 -07:00
projection_integration_spec.ts fix(ivy): DebugNode.query should query nodes in the logical tree (#29480) 2019-03-26 12:48:37 -07:00
query_integration_spec.ts fix(ivy): ensure views created in constructors dont break queries (#29983) 2019-04-19 10:01:32 -07:00
query_list_spec.ts fix(core): ensure initial value of QueryList length (#21980) (#21982) 2018-02-07 12:08:44 -08:00
regression_integration_spec.ts refactor: move DOCUMENT imports from platform-browser to common (#29237) 2019-03-14 16:01:57 -04:00
security_integration_spec.ts fix(ivy): DebugNode.query should query nodes in the logical tree (#29480) 2019-03-26 12:48:37 -07:00
source_map_integration_node_only_spec.ts fix(ivy): DebugNode.query should query nodes in the logical tree (#29480) 2019-03-26 12:48:37 -07:00
system_ng_module_factory_loader_spec.ts fix(ivy): don't load factories when using Ivy (#28685) 2019-04-12 11:26:24 -07:00
view_injector_integration_spec.ts test(ivy): run view_injector_integration tests on node (#28593) 2019-02-08 09:25:50 -08:00