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
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%