Title: A projected template is subject to a ChangeDetectionRef which is not controlling the template · Issue #14321 · angular/angular · GitHub
Open Graph Title: A projected template is subject to a ChangeDetectionRef which is not controlling the template · Issue #14321 · angular/angular
X Title: A projected template is subject to a ChangeDetectionRef which is not controlling the template · Issue #14321 · angular/angular
Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When projecting a template into another component as a ContentChild, the template is subjected to the ChangeDetectorRef of ...
Open Graph Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When projecting a template into another component as a ContentChild, the template i...
X Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When projecting a template into another component as a ContentChild, ...
Opengraph URL: https://github.com/angular/angular/issues/14321
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A projected template is subject to a ChangeDetectionRef which is not controlling the template","articleBody":"**I'm submitting a ...** (check one with \"x\")\r\n```\r\n[x] bug report\r\n[ ] feature request\r\n[ ] support request\r\n```\r\n\r\n**Current behavior**\r\nWhen projecting a template into another component as a `ContentChild`, the template is subjected to the `ChangeDetectorRef` of the host component and not of the component in which the template is defined. This results in a situation in which a projected component is not notified of changes.\r\n\r\n**Expected behavior**\r\nA template needs to be independent of the `changeDetectionRef` in which the template is projected, because there is no direct relation between the two components.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nA reproduction of the issue can be found here: https://plnkr.co/edit/tU4EPzvtDSoPBlMuwvRH?p=preview\r\n\r\nThis plunkr reproduces the problem. A template containing a `ProjectedComponent` is projected into the `TestComponent`. All of this is defined in the `TestApp` Component. The `ProjectedComponent` has an `@Input` which can be changed by editing the input element. However, due to the `OnPush` changedetection stategy of the `TestComponent`, the value is not updated in the `ProjectedComponent`.\r\n\r\nIt seems that the projected content is subject to the wrong ChangeDetectionStrategy making it impossible to project rich content into another component without (somehow) exposing the changedetection strategy of the host component.\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\n\u003c!-- Describe the motivation or the concrete use case -->\r\n\r\n**Please tell us about your environment:**\r\nJust a browser (JIT)\r\n\r\n* **Angular version:** 2.X\r\n\r\n* **Browser:** all\r\n \r\n* **Language:** Typescript\r\n","author":{"url":"https://github.com/HarmenM","@type":"Person","name":"HarmenM"},"datePublished":"2017-02-06T12:46:00Z","url":"https://github.com/angular/angular/issues/14321"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46941ccb-80cb-26f9-2625-f8903444ae15 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 901C:229B2E:1AFD856:238DF26:6B014AB8 |
| html-safe-nonce | a5cac94ee0b6f19306546af0a8450af766ff34f95da4b8f22a508e7d0307c5ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDFDOjIyOUIyRToxQUZEODU2OjIzOERGMjY6NkIwMTRBQjgiLCJ2aXNpdG9yX2lkIjoiMzcxNzM1NTI4NzA3NTQxNjg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 70dc6b981bec1de9ab0ad64649812f941839ab8432c70ad759549a03e3b26590 |
| hovercard-subject-tag | issue:205573484 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/14321/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95b1f7790908b1ff869171603662df929fef791a3636a7963e28db067b875979/angular/angular/issues/14321 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95b1f7790908b1ff869171603662df929fef791a3636a7963e28db067b875979/angular/angular/issues/14321 |
| og:image:alt | I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When projecting a template into another component as a ContentChild, the template i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | HarmenM |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width