Title: BUG: IVY change detection on push for component within ng-template not invalidated · Issue #33285 · angular/angular · GitHub
Open Graph Title: BUG: IVY change detection on push for component within ng-template not invalidated · Issue #33285 · angular/angular
X Title: BUG: IVY change detection on push for component within ng-template not invalidated · Issue #33285 · angular/angular
Description: 🐞 bug report Affected Package @angular/core @angular/common Is this a regression? Yes definitely yes, it is working without ivy (Angular 8) without any problem. Description When you have components set to ChangeDetectionStrategy.OnPush a...
Open Graph Description: 🐞 bug report Affected Package @angular/core @angular/common Is this a regression? Yes definitely yes, it is working without ivy (Angular 8) without any problem. Description When you have components...
X Description: 🐞 bug report Affected Package @angular/core @angular/common Is this a regression? Yes definitely yes, it is working without ivy (Angular 8) without any problem. Description When you have components...
Opengraph URL: https://github.com/angular/angular/issues/33285
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BUG: IVY change detection on push for component within ng-template not invalidated","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\n@angular/core\r\n@angular/common\r\n\r\n### Is this a regression?\r\n\r\nYes definitely yes, it is working without ivy (Angular 8) without any problem.\r\n\r\n### Description\r\n\r\nWhen you have components set to `ChangeDetectionStrategy.OnPush` and you have component which obtains `TemplateRef` from its *content* using `ContentChild` for example, then you put component inside this template and change one of its inputs, change detection is not triggered inside this component and you can not see changes, since component inside has not invalidated its view.\r\n\r\nIf you put your component in `\u003cng-content>` it is working, but not with `\u003cng-template>`.\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nHere is working version with Angular 8 without IVY\r\nhttps://stackblitz.com/edit/angular-xfuujc\r\n\r\nAnd here (branch *ivy-error*) is not working version with Angular 9-next.12 with IVY\r\nhttps://github.com/kukjevov/ng-universal-demo\r\n\r\n> `git clone https://github.com/kukjevov/ng-universal-demo.git`\r\n> `cd ng-universal-demo`\r\n> `git checkout ivy-error`\r\n> `npm install`\r\n> `npm start`\r\n> open browser at `http://localhost:8888`\r\n\r\n## 🔥 Exception or Error\r\n\r\nThere is one async change after 5 seconds to `data \"bla bla\"` and also it is possible to click on button which will cause change of displayed value. In stackblitz it is working, in provided repo it is not working.\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\nAngular 9-next.12\r\n\r\n**Anything else relevant?**\r\nWindows: 10.0.17763\r\nNode: 11.6.0\r\nNPM: 6.9.0\r\n","author":{"url":"https://github.com/kukjevov","@type":"Person","name":"kukjevov"},"datePublished":"2019-10-21T05:24:20Z","url":"https://github.com/angular/angular/issues/33285"}
| 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:2b1e63a0-1e35-d527-174d-9d3df8a9755c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D972:F7C4C:124F05D:1884CB2:6B012591 |
| html-safe-nonce | 9afd9d134c4adf688e46600cd426022b96ae655cf65f8afdcb7020e5f050271e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTcyOkY3QzRDOjEyNEYwNUQ6MTg4NENCMjo2QjAxMjU5MSIsInZpc2l0b3JfaWQiOiIxMTMxNjg0NjQ1NDcwMDIxMDA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7deda723576568d1f96fe7eee1c4fbde36ae87282ef336d3a083734fc65c70fe |
| hovercard-subject-tag | issue:509737272 |
| 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/33285/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a25cdb9f091e4e3dbd2946aa2af876f4b0a3265c0b319c95225ef1d8643dc46b/angular/angular/issues/33285 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a25cdb9f091e4e3dbd2946aa2af876f4b0a3265c0b319c95225ef1d8643dc46b/angular/angular/issues/33285 |
| og:image:alt | 🐞 bug report Affected Package @angular/core @angular/common Is this a regression? Yes definitely yes, it is working without ivy (Angular 8) without any problem. Description When you have components... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kukjevov |
| 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