-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($compile): fix duplicate style attributes #6242
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
@lgalfaso Alright, I will have more time to look into this later this week. |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
function($compile, $rootScope) { | ||
element = $compile('<div replace-with-non-interpolated-style></div>')($rootScope); | ||
$rootScope.$digest(); | ||
expect(element.attr('style')).toMatch(/^color\: red;?$/ig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this test fail without the change to the compiler? it doesn't look like it should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I answered my own question, okay.
well it generally looks okay to me, although it's not clear to me why we don't do something fancier like merge the CSSStyleDeclarations instead --- except I guess that would't work for interpolation |
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
8292c21
to
7b9fddf
Compare
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
4dd5a20
to
998c61c
Compare
This type of duplication has been fixed - can't say exactly when, but at least since 1.5.0 |
This fix avoids duplicating style attributes in directives that specify
'replace: true' and 'template: <div style="..." />'.
Closes #6239