Repository navigation
fix(core): remove obsolete check for [class] and [className] presence - #41254
Closed
AndrewKushnir wants to merge 3 commits into
Closed
AndrewKushnir wants to merge 3 commits into
AndrewKushnir wants to merge 3 commits into
Conversation
mhevery
approved these changes
Mar 18, 2021
Previously presence of both [class] and [className] bindings on an element was treated as compiler error (implemented in angular@6f203c9). Later, the situation was improved to actually allow both bindings to co-exist (see angular@a153b61), however the compiler check was not removed completely. The only situation where the error is thrown at this moment is when static (but with interpolation) and bound `class` attributes are present on an element, for ex.: ``` <div class="{{ one }}" [class]="'two'"></div> ``` In the current situation the error is acually misleading (as it refers to `[className]`). This commit removes the mentioned compiler check as obsolete and makes the `class` and `style` attribute processing logically the same (the last occurrence is used to compute the value).
AndrewKushnir
force-pushed
the
classes-exception
branch
from
March 18, 2021 22:49
6a69de3 to
41c3c87
Compare
AndrewKushnir
marked this pull request as ready for review
March 19, 2021 00:44
Contributor
Author
mhevery
pushed a commit
that referenced
this pull request
Mar 19, 2021
…#41254) Previously presence of both [class] and [className] bindings on an element was treated as compiler error (implemented in 6f203c9). Later, the situation was improved to actually allow both bindings to co-exist (see a153b61), however the compiler check was not removed completely. The only situation where the error is thrown at this moment is when static (but with interpolation) and bound `class` attributes are present on an element, for ex.: ``` <div class="{{ one }}" [class]="'two'"></div> ``` In the current situation the error is acually misleading (as it refers to `[className]`). This commit removes the mentioned compiler check as obsolete and makes the `class` and `style` attribute processing logically the same (the last occurrence is used to compute the value). PR Close #41254
TeriGlover
pushed a commit
to TeriGlover/angular
that referenced
this pull request
Apr 5, 2021
…angular#41254) Previously presence of both [class] and [className] bindings on an element was treated as compiler error (implemented in angular@6f203c9). Later, the situation was improved to actually allow both bindings to co-exist (see angular@a153b61), however the compiler check was not removed completely. The only situation where the error is thrown at this moment is when static (but with interpolation) and bound `class` attributes are present on an element, for ex.: ``` <div class="{{ one }}" [class]="'two'"></div> ``` In the current situation the error is acually misleading (as it refers to `[className]`). This commit removes the mentioned compiler check as obsolete and makes the `class` and `style` attribute processing logically the same (the last occurrence is used to compute the value). PR Close angular#41254
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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, presence of both [class] and [className] bindings on an element was treated as compiler error (implemented in 6f203c9). Later, the situation was improved to actually allow both bindings to co-exist (see a153b61), however the compiler check was not removed completely. The only situation where the error is thrown at this moment is when static (but with interpolation) and bound
classattributes are present on an element, for ex.:In the current situation the error is actually misleading (as it refers to
[className]).This commit removes the mentioned compiler check as obsolete and makes the
classandstyleattribute processing logically the same (the last occurrence is used to compute the value).PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?