angular-cn/packages/compiler-cli/test
JoostK 2afc40608d fix(ivy): support injecting ChangeDetectorRef on templates (#27565)
Previously, using a pipe in an input binding on an ng-template would
evaluate the pipe in the context of node that was processed before the
template. This caused the retrieval of e.g. ChangeDetectorRef to be
incorrect, resulting in one of the following bugs depending on the
template's structure:

1. If the template was at the root of a view, the previously processed
node would be the component's host node outside of the current view.
Accessing that node in the context of the current view results in a crash.
2. For templates not at the root, the ChangeDetectorRef injected into the
pipe would correspond with the previously processed node. If that node
hosts a component, the ChangeDetectorRef would not correspond with the
view that the ng-template is part of.

The solution to the above problem is two-fold:

1. Template compilation is adjusted such that the template instruction
is emitted before any instructions produced by input bindings, such as
pipes. This ensures that pipes are evaluated in the context of the
template's container node.
2. A ChangeDetectorRef can be requested for container nodes.

Fixes #28587

PR Close #27565
2019-02-13 09:46:53 -08:00
..
compliance fix(ivy): support injecting ChangeDetectorRef on templates (#27565) 2019-02-13 09:46:53 -08:00
diagnostics refactor(compiler): use `options` argument for parsers (#28055) 2019-02-12 20:58:27 -08:00
metadata test(ivy): mark failing test targets with fixme-ivy-jit and fixme-ivy-local tags (#26471) 2018-10-23 08:57:42 -07:00
ngcc build: support running compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
ngtsc test(ivy): add template source mapping tests (#28055) 2019-02-12 20:58:28 -08:00
transformers build: fix failing compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
BUILD.bazel build: support running compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
extract_i18n_spec.ts build: remove unused "test.sh" leftover code in compiler-cli (#28352) 2019-02-05 14:31:10 -05:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts build: fix failing compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
ngtools_api_spec.ts fix(ivy): support listing lazy route for project-root-relative entry point in `ngtsc` (#28542) 2019-02-11 16:23:30 -08:00
perform_compile_spec.ts feat(compiler-cli): add support to extend `angularCompilerOptions` (#22717) 2018-09-19 16:17:28 -07:00
perform_watch_spec.ts build: fix failing compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
runfile_helpers.ts build: support running compiler-cli tests on windows (#28352) 2019-02-05 14:31:10 -05:00
test_support.ts test(ivy): test listing lazy routes to different root directories (#28542) 2019-02-11 16:23:30 -08:00