Repository navigation
Conversation
…onent Previously, a downgraded component compiled whatever its element contained when the component was created. By then, AngularJS could already have linked or written content into the element, for example through `ng-transclude` or `ng-bind` on it, and that content was compiled again. The contents are now copied when the directive's controller is instantiated, before anything on the element is linked, and that copy is what gets compiled. If there is nothing to copy, whatever AngularJS put into the element is projected as it is, so content added by `ng-transclude` keeps the scope it was linked with. Fixes angular#71441
SkyZeroZx
marked this pull request as ready for review
October 20, 2026 14:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, a downgraded component compiled whatever its element contained when the component was created. By then, AngularJS could already have linked or written content into the element, for example through
ng-transcludeorng-bindon it, and that content was compiled again.The contents are now copied when the directive's controller is instantiated, before anything on the element is linked, and that copy is what gets compiled. If there is nothing to copy, whatever AngularJS put into the element is projected as it is, so content added by
ng-transcludekeeps the scope it was linked with.Fixes #71441