fix(platform-browser): mark Meta and Title services as tree shakable providers (#24815)
This lets services that use Meta and Title services to be tree shakable and provided in root. PR Close #24815
This commit is contained in:
parent
1089261717
commit
197387d05e
|
@ -89,8 +89,6 @@ export const BROWSER_MODULE_PROVIDERS: StaticProvider[] = [
|
|||
{provide: Testability, useClass: Testability, deps: [NgZone]},
|
||||
{provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone]},
|
||||
ELEMENT_PROBE_PROVIDERS,
|
||||
{provide: Meta, useClass: Meta, deps: [DOCUMENT]},
|
||||
{provide: Title, useClass: Title, deps: [DOCUMENT]},
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ export type MetaDefinition = {
|
|||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class Meta {
|
||||
private _dom: DomAdapter;
|
||||
constructor(@Inject(DOCUMENT) private _doc: any) { this._dom = getDOM(); }
|
||||
|
|
|
@ -22,7 +22,7 @@ import {DOCUMENT} from '../dom/dom_tokens';
|
|||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class Title {
|
||||
constructor(@Inject(DOCUMENT) private _doc: any) {}
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue