Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(platform-browser): insert APP_ID in styles, contentAttr and hostAttr #17745
Does please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: 16676
What is the new behavior?
APP_ID is inserted between nghost/ngcontent and component id in styles, contentAttr and hostAttr as it is supposed to do according to the documentation (https://angular.io/guide/component-styles)
Does this PR introduce a breaking change?
Existing tests have been modified to check for the APP_ID presence. Documentation already states that this should be present, so the change is bringing the implementation closer to how the documentation says it should work.
referenced this pull request
Jun 24, 2017
@splincode It is still relevant. Without it you will have overlapping styles when having multiple angular apps on the same page, which is caused by the app id no being included as it is supposed to be according to the documentation here: https://angular.io/guide/component-styles#inspecting-generated-css
@splincode Did I merge / rebase the wrong way?
I did this:
(as written here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md - if changes are suggested (10))
I've only made two commits. These are the only changes: master...petersalomonsen:16676-viewencapsulation-appid
@petersalomonsen Thanks for responding. I got your changes and applied the diff to my local
I definitely prefer Angular to have this fixed instead of monkey patching it the way I am doing. However, I have no other way for our project to move on now. =(
Really hope this gets merged soon. Who can we @ to get this expedited?
Problem with a window-scoped auto-increment component id is that it would not be according to the documentation: https://angular.io/guide/component-styles#inspecting-generated-css - where you can see that the app id is part of the component id.
As said in the beginning this pull request is just about making it work as the documentation says it should.
@petersalomonsen I think you have to make some party when this PR will be merged xD
I don't want to tell you how to prioritize issues, I just can tell how it looks from user perspective :) . And as for me something what is documented and doesn't work in 100% cases should be fixed ASAP instead of waiting for 2 years...