-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: change detectionstate: has PR
Milestone
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 OnPush component and it has at least one attached template.
This happens because we do:
- Find all templates that need to be CDed down the tree
- if the component is NOT Dirty or CheckAlways then we start CDing the templates, as long as the template count is > 0
- 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
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
Run the provided example.
Notice that `defaultDetached` is the only one that will be kept stable.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 14.1.0
Node: 16.13.2
Package Manager: npm 8.4.1
OS: darwin arm64
Angular: 14.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1401.0
@angular-devkit/build-angular 14.1.0
@angular-devkit/core 14.1.0
@angular-devkit/schematics 14.1.0
@schematics/angular 14.1.0
rxjs 7.5.6
typescript 4.7.4
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: change detectionstate: has PR