refactor(core): cleanup unused `NgZone` factory
This factory was only used when using `coreBootstrap` / `coreLoadAndBoostrap` which is not supported any more.
This commit is contained in:
parent
251953218c
commit
633c7d1ebe
|
@ -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<Type|{[k: string]: any}|any[]>
|
|||
*/
|
||||
@NgModule({
|
||||
providers: [
|
||||
{
|
||||
provide: NgZone,
|
||||
useFactory: createNgZone,
|
||||
deps: <any>[[new SkipSelfMetadata(), new OptionalMetadata(), NgZone]]
|
||||
},
|
||||
ApplicationRef_,
|
||||
{provide: ApplicationRef, useExisting: ApplicationRef_},
|
||||
Compiler,
|
||||
|
|
Loading…
Reference in New Issue