fix(platform-browser): should only add styles with native encapsulation in shadow DOM (#14313)
Closes #7887 PR Close #14313
This commit is contained in:

committed by
Miško Hevery

parent
1cfbefebe3
commit
53cf2ec573
@ -127,7 +127,6 @@ export class DomRenderer implements Renderer {
|
||||
let nodesParent: Element|DocumentFragment;
|
||||
if (this.componentProto.encapsulation === ViewEncapsulation.Native) {
|
||||
nodesParent = (hostElement as any).createShadowRoot();
|
||||
this._rootRenderer.sharedStylesHost.addHost(nodesParent);
|
||||
for (let i = 0; i < this._styles.length; i++) {
|
||||
const styleEl = document.createElement('style');
|
||||
styleEl.textContent = this._styles[i];
|
||||
|
Reference in New Issue
Block a user