angular-cn/packages/compiler/src
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
..
aot refactor(compiler): allow disabling external symbol factory reexports (#28594) 2019-02-11 17:12:50 +00:00
compiler_util refactor(compiler): capture `sourceSpan` when converting action bindings to output AST (#28055) 2019-02-12 20:58:28 -08:00
css_parser
expression_parser fix(compiler): ensure that event handlers have the correct source spans (#28055) 2019-02-12 20:58:28 -08:00
i18n refactor(compiler): use `options` argument for parsers (#28055) 2019-02-12 20:58:27 -08:00
jit refactor(compiler): wrap the jit evaluation in an injectable class (#28055) 2019-02-12 20:58:27 -08:00
ml_parser fix(compiler): markup lexer should not capture quotes in attribute value (#28055) 2019-02-12 20:58:27 -08:00
output refactor(compiler): wrap the jit evaluation in an injectable class (#28055) 2019-02-12 20:58:27 -08:00
render3 fix(ivy): support injecting ChangeDetectorRef on templates (#27565) 2019-02-13 09:46:53 -08:00
schema fix(core): size regression with closure compiler (#25531) 2018-08-30 21:22:40 -07:00
template_parser fix(compiler): ensure that event handlers have the correct source spans (#28055) 2019-02-12 20:58:28 -08:00
view_compiler feat(ivy): implement TestBed (#25369) 2018-08-14 11:58:47 -07:00
assertions.ts
ast_path.ts
chars.ts feat(compiler): support tokenizing escaped strings (#28055) 2019-02-12 20:58:27 -08:00
compile_metadata.ts feat(ivy): patch animations into metadata (#25828) 2018-09-07 13:46:06 -07:00
compile_reflector.ts
compiler.ts feat(ivy): add source mappings to compiled Angular templates (#28055) 2019-02-12 20:58:28 -08:00
compiler_facade_interface.ts fix(ivy): verify Host Bindings and Host Listeners before compiling them (#28356) 2019-01-29 16:36:22 -08:00
config.ts feat: add TypeScript 3 support (#25275) 2018-08-27 21:07:53 -04:00
constant_pool.ts feat(ivy): ICU support for Ivy (#26794) 2018-11-16 16:09:30 -08:00
core.ts fix(ivy): merge static style rendering across elements, directives and components (#27661) 2018-12-21 18:14:44 -05:00
directive_normalizer.ts refactor(compiler): use `options` argument for parsers (#28055) 2019-02-12 20:58:27 -08:00
directive_resolver.ts
identifiers.ts feat(ivy): setClassMetadata() for assigning decorator metadata (#26860) 2018-10-31 19:52:36 -04:00
injectable_compiler.ts
injectable_compiler_2.ts fix(ivy): ngtsc should include generic types on injectable definitions (#27037) 2018-12-06 13:33:13 -08:00
jit_compiler_facade.ts test(core): update JIT source mapping tests for ivy (#28055) 2019-02-12 20:58:27 -08:00
lifecycle_reflector.ts feat(ivy): implement TestBed (#25369) 2018-08-14 11:58:47 -07:00
metadata_resolver.ts feat(ivy): implement TestBed (#25369) 2018-08-14 11:58:47 -07:00
ng_module_compiler.ts
ng_module_resolver.ts
parse_util.ts fix(ivy): verify Host Bindings and Host Listeners before compiling them (#28356) 2019-01-29 16:36:22 -08:00
pipe_resolver.ts
provider_analyzer.ts
resource_loader.ts
selector.ts feat(ivy): add generics to the SelectorMatcher API (#26203) 2018-10-04 10:11:17 -07:00
shadow_css.ts
style_compiler.ts feat(ivy): bridge component styles into the component renderer (#25255) 2018-08-23 16:51:15 -04:00
style_url_resolver.ts
summary_resolver.ts
url_resolver.ts
util.ts fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734) 2018-10-31 14:15:06 -04:00
version.ts