refactor(core): move Meta methods that only have one version from DomAdapter (#32408)
PR Close #32408
This commit is contained in:

committed by
Miško Hevery

parent
1a7c79746d
commit
89434e09c2
@ -18,7 +18,7 @@ export class ServerStylesHost extends SharedStylesHost {
|
||||
@Inject(DOCUMENT) private doc: any,
|
||||
@Optional() @Inject(ɵTRANSITION_ID) private transitionId: string) {
|
||||
super();
|
||||
this.head = getDOM().getElementsByTagName(doc, 'head')[0];
|
||||
this.head = doc.getElementsByTagName('head')[0];
|
||||
}
|
||||
|
||||
private _addStyle(style: string): void {
|
||||
@ -26,9 +26,9 @@ export class ServerStylesHost extends SharedStylesHost {
|
||||
const el = adapter.createElement('style');
|
||||
el.textContent = style;
|
||||
if (!!this.transitionId) {
|
||||
adapter.setAttribute(el, 'ng-transition', this.transitionId);
|
||||
el.setAttribute('ng-transition', this.transitionId);
|
||||
}
|
||||
adapter.appendChild(this.head, el);
|
||||
this.head.appendChild(el);
|
||||
}
|
||||
|
||||
onStylesAdded(additions: Set<string>) { additions.forEach(style => this._addStyle(style)); }
|
||||
|
Reference in New Issue
Block a user