diff --git a/modules/@angular/core/src/application_module.ts b/modules/@angular/core/src/application_module.ts index 6c9be7b0c8..95347712ce 100644 --- a/modules/@angular/core/src/application_module.ts +++ b/modules/@angular/core/src/application_module.ts @@ -18,7 +18,6 @@ import {ComponentResolver} from './linker/component_resolver'; import {DynamicComponentLoader, DynamicComponentLoader_} from './linker/dynamic_component_loader'; import {ViewUtils} from './linker/view_utils'; import {NgModule} from './metadata'; -import {NgZone} from './zone/ng_zone'; let __unused: Type; // avoid unused import when Type union types are erased @@ -30,19 +29,6 @@ export function _keyValueDiffersFactory() { return defaultKeyValueDiffers; } -export function createNgZone(parent: NgZone): NgZone { - // If an NgZone is already present in the parent injector, - // use that one. Creating the NgZone in the same injector as the - // application is dangerous as some services might get created before - // the NgZone has been created. - // We keep the NgZone factory in the application providers for - // backwards compatibility for now though. - if (parent) { - return parent; - } - return new NgZone({enableLongStackTrace: isDevMode()}); -} - /** * A default set of providers which should be included in any Angular * application, regardless of the platform it runs onto. @@ -59,11 +45,6 @@ export const APPLICATION_COMMON_PROVIDERS: Array */ @NgModule({ providers: [ - { - provide: NgZone, - useFactory: createNgZone, - deps: [[new SkipSelfMetadata(), new OptionalMetadata(), NgZone]] - }, ApplicationRef_, {provide: ApplicationRef, useExisting: ApplicationRef_}, Compiler,