fix(platform-browser): workaround wrong import path generated by ngc for DOCUMENT (#24830)
This commit is contained in:
@ -6,11 +6,17 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Inject, Injectable} from '@angular/core';
|
||||
import {Inject, Injectable, inject} from '@angular/core';
|
||||
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
import {DOCUMENT} from '../dom/dom_tokens';
|
||||
|
||||
/**
|
||||
* Factory to create Title service.
|
||||
*/
|
||||
export function createTitle() {
|
||||
return new Title(inject(DOCUMENT));
|
||||
}
|
||||
|
||||
/**
|
||||
* A service that can be used to get and set the title of a current HTML document.
|
||||
@ -22,7 +28,7 @@ import {DOCUMENT} from '../dom/dom_tokens';
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Injectable({providedIn: 'root'})
|
||||
@Injectable({providedIn: 'root', useFactory: createTitle, deps: []})
|
||||
export class Title {
|
||||
constructor(@Inject(DOCUMENT) private _doc: any) {}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user