Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(compiler): correctly parse attributes with a dot in the name #32256
Conversation
0ef5f94
to
6162390
LGTM - can you modify the commit message slightly:
|
Previously the compiler would ignore everything in the attribute name after the first dot. For example <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr="varValue"></div>. This commit ensures that whole attribute name is captured. Now <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr.attrSuffix="varValue"></div>
This comment has been minimized.
This comment has been minimized.
@petebacondarwin thank you! I have updated the commit message |
This comment has been minimized.
This comment has been minimized.
ngbot
bot
commented
Nov 6, 2019
This comment has been minimized.
This comment has been minimized.
Is it something I need to do from my side, @petebacondarwin? Not sure I can understand the falling status correctly |
This comment has been minimized.
This comment has been minimized.
@n0th1ng-else - no we just need a Googler (perhaps @alxhub ?) to run a presubmit to test that it works inside Google's repository before it can be merged. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @n0th1ng-else, this seems to break |
This comment has been minimized.
This comment has been minimized.
Hmm, that is a bit of a problem. I'm surprised that we don't have tests for this in the framework! The It might be that we can avoid dotted names for some subset of well-known attributes, like |
This comment has been minimized.
This comment has been minimized.
Ah, sorry this was incorrect. After some digging, what actually happened was an incorrect configuration in the failing component. It has |
This comment has been minimized.
This comment has been minimized.
I think we should push this to 10.0 unfortunately. We're in RC now, I don't think we should introduce more breaking changes unless there are issues with the current RC that we cannot address otherwise. We could potentially investigate doing this as a fix if we can find a way to make it non-breaking. |
This comment has been minimized.
This comment has been minimized.
I don't think 9.1 can accept breaking changes... |
This comment has been minimized.
This comment has been minimized.
ngbot
bot
commented
Nov 7, 2019
This comment has been minimized.
This comment has been minimized.
Discussed with @alxhub and given that we only found one occurrence for |
) Previously the compiler would ignore everything in the attribute name after the first dot. For example <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr="varValue"></div>. This commit ensures that whole attribute name is captured. Now <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr.attrSuffix="varValue"></div> PR Close #32256
…ular#32256) Previously the compiler would ignore everything in the attribute name after the first dot. For example <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr="varValue"></div>. This commit ensures that whole attribute name is captured. Now <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr.attrSuffix="varValue"></div> PR Close angular#32256
…ular#32256) Previously the compiler would ignore everything in the attribute name after the first dot. For example <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr="varValue"></div>. This commit ensures that whole attribute name is captured. Now <div [attr.someAttr.attrSuffix]="var"></div> is turned into <div someAttr.attrSuffix="varValue"></div> PR Close angular#32256
n0th1ng-else commentedAug 22, 2019
•
edited
Previously the compiler would ignore everything in the attribute
name after the first dot. For example
<div [attr.someAttr.attrSuffix]="var"></div>
is turned into
<div someAttr="varValue"></div>
.This commit ensures that whole attribute name is captured.
Now
<div [attr.someAttr.attrSuffix]="var"></div>
is turned into
<div someAttr.attrSuffix="varValue"></div>
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
element
<div [attr.someProp.propSuffix]="var"></div>
turns into
<div someProp="varValue"></div>
(note thepropSuffix
is cut)Issue Number: #31334
What is the new behavior?
element
<div [attr.someProp.propSuffix]="var"></div>
result this html
<div someProp.propSuffix="varValue"></div>
(note thepropSuffix
now exists)Does this PR introduce a breaking change?
Other information