Revert "refactor(core): tree-shake application_module providers (#23477)"

This reverts commit eb031c6ff1.

The change is breaking targets in g3 see cl/194336387.
This commit is contained in:
Igor Minar
2018-04-26 14:08:13 -07:00
parent 1a44a0b4a8
commit 5b96078624
8 changed files with 20 additions and 61 deletions

View File

@ -6,11 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/
import {ApplicationInitStatus} from './application_init';
import {ApplicationRef} from './application_ref';
import {APP_ID_RANDOM_PROVIDER} from './application_tokens';
import {IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers} from './change_detection/change_detection';
import {Inject, Optional, SkipSelf} from './di/metadata';
import {APP_ROOT} from './di/scope';
import {LOCALE_ID} from './i18n/tokens';
import {Compiler} from './linker/compiler';
import {NgModule} from './metadata';
export function _iterableDiffersFactory() {
@ -26,14 +28,17 @@ export function _localeFactory(locale?: string): string {
}
/**
* This module includes the providers of @angular/core that are needed
* to bootstrap components via `ApplicationRef`.
*
* @experimental
*/
@NgModule({
providers: [
ApplicationRef,
ApplicationInitStatus,
Compiler,
APP_ID_RANDOM_PROVIDER,
// wen-workers need this value to be here since WorkerApp is defined
// ontop of this application
{provide: APP_ROOT, useValue: true},
{provide: IterableDiffers, useFactory: _iterableDiffersFactory},
{provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory},
{
@ -44,4 +49,6 @@ export function _localeFactory(locale?: string): string {
]
})
export class ApplicationModule {
// Inject ApplicationRef to make it eager...
constructor(appRef: ApplicationRef) {}
}