fix(platform-server): render styles in app component instead of <head>
This ensures when the tree is serialized to the client and the app is later bootstrapped, the <style> tags created during server-side rendering are destroyed.
This commit is contained in:

committed by
Igor Minar

parent
17486fd696
commit
30380d010b
@ -47,6 +47,7 @@ export class ServerRenderer implements Renderer {
|
||||
if (componentProto.encapsulation === ViewEncapsulation.Native) {
|
||||
throw new Error('Native encapsulation is not supported on the server!');
|
||||
}
|
||||
this._rootRenderer.sharedStylesHost.addStyles(this._styles);
|
||||
if (this.componentProto.encapsulation === ViewEncapsulation.Emulated) {
|
||||
this._contentAttr = shimContentAttribute(styleShimId);
|
||||
this._hostAttr = shimHostAttribute(styleShimId);
|
||||
|
Reference in New Issue
Block a user