Title: Transplanted views are change detected regardless if they're detached from CD when inside OnPush components · Issue #46973 · angular/angular · GitHub
Open Graph Title: Transplanted views are change detected regardless if they're detached from CD when inside OnPush components · Issue #46973 · angular/angular
X Title: Transplanted views are change detected regardless if they're detached from CD when inside OnPush components · Issue #46973 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description This is possibly a regression from ivy. When you create an embedded view and detach it, angular will run CD in it as long as it's inside a O...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description This is possibly a regression from ivy. When you create an embedded view and detach it, angular will...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description This is possibly a regression from ivy. When you create an embedded view and detach it, angular will...
Opengraph URL: https://github.com/angular/angular/issues/46973
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Transplanted views are change detected regardless if they're detached from CD when inside OnPush components","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nThis is possibly a regression from ivy.\r\n\r\nWhen you create an embedded view and detach it, angular will run CD in it as long as it's inside a OnPush component and it has at least one attached template.\r\n\r\nThis happens because we do:\r\n\r\n1. Find all templates that need to be CDed down the tree\r\n2. if the component is NOT Dirty or CheckAlways then we start CDing the templates, as long as the template count is > 0\r\n3. We never check if the template is attached once we reach this step. So if you have 2 transplanted views the TRANSPLANTED_VIEWS_COUNT will be 2 and both views will be CDed\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/angular-ivy-mki9ct?file=src%2Fapp%2Fbug.ts,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts\n\n### Please provide the exception or error you saw\n\n```true\nRun the provided example.\r\n\r\nNotice that `defaultDetached` is the only one that will be kept stable.\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 14.1.0\r\nNode: 16.13.2\r\nPackage Manager: npm 8.4.1\r\nOS: darwin arm64\r\n\r\nAngular: 14.1.0\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1401.0\r\n@angular-devkit/build-angular 14.1.0\r\n@angular-devkit/core 14.1.0\r\n@angular-devkit/schematics 14.1.0\r\n@schematics/angular 14.1.0\r\nrxjs 7.5.6\r\ntypescript 4.7.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/edusperoni","@type":"Person","name":"edusperoni"},"datePublished":"2022-07-26T22:27:44Z","url":"https://github.com/angular/angular/issues/46973"}
| 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:239a9195-9cef-de85-6176-dbfac0ca282f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9108:3A347:F4B408:14567E3:6B0107E9 |
| html-safe-nonce | a65400b2dbab8da25ad855745165c68dba88a2180c9b43e7acd00fead6b688ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTA4OjNBMzQ3OkY0QjQwODoxNDU2N0UzOjZCMDEwN0U5IiwidmlzaXRvcl9pZCI6IjM4NDkwNTY3NjY1NTgwMTM0MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b599d85d5ec7d482eace9896db491bf4cca3b516973549abcadb2d8730b36cda |
| hovercard-subject-tag | issue:1318812140 |
| 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/46973/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8444517a78b06f1b5ad1885ba05bf758c32c4708b81bc08a95b7e96fa19af8a4/angular/angular/issues/46973 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8444517a78b06f1b5ad1885ba05bf758c32c4708b81bc08a95b7e96fa19af8a4/angular/angular/issues/46973 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description This is possibly a regression from ivy. When you create an embedded view and detach it, angular will... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | edusperoni |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width