Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(platform-browser): mark Meta and Title services as tree shakable … #24815

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/platform-browser/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]},
];

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-browser/src/browser/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-browser/src/browser/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {DOCUMENT} from '../dom/dom_tokens';
*
* @experimental
*/
@Injectable()
@Injectable({providedIn: 'root'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this is provided by a module (BROWSER_MODULE_PROVIDERS in browser.ts). Shouldn't it be removed from there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

export class Title {
constructor(@Inject(DOCUMENT) private _doc: any) {}
/**
Expand Down