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:
Vikram Subramanian 2018-07-10 08:26:48 -07:00 committed by Miško Hevery
parent 1089261717
commit 197387d05e
3 changed files with 2 additions and 4 deletions

View File

@ -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]},
];
/**

View File

@ -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(); }

View File

@ -22,7 +22,7 @@ import {DOCUMENT} from '../dom/dom_tokens';
*
* @experimental
*/
@Injectable()
@Injectable({providedIn: 'root'})
export class Title {
constructor(@Inject(DOCUMENT) private _doc: any) {}
/**