@@ -10,7 +10,7 @@ import {compileNgModuleFactory} from '../application/application_ngmodule_factor
1010import { BootstrapOptions , optionsReducer } from '../application/application_ref' ;
1111import { validAppIdInitializer } from '../application/application_tokens' ;
1212import { provideZonelessChangeDetectionInternal } from '../change_detection/scheduling/zoneless_scheduling_impl' ;
13- import { EnvironmentProviders , Injectable , Injector , Provider , StaticProvider } from '../di' ;
13+ import { EnvironmentProviders , Injectable , Injector , Provider } from '../di' ;
1414import { errorHandlerEnvironmentInitializer } from '../error_handler' ;
1515import { RuntimeError , RuntimeErrorCode } from '../errors' ;
1616import { Type } from '../interface/type' ;
@@ -19,11 +19,6 @@ import {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';
1919import { createNgModuleRefWithProviders } from '../render3/ng_module_ref' ;
2020import { bootstrap , setModuleBootstrapImpl } from './bootstrap' ;
2121import { PLATFORM_DESTROY_LISTENERS } from './platform_destroy_listeners' ;
22- import {
23- getNgZoneOptions ,
24- internalProvideZoneChangeDetection ,
25- } from '../change_detection/scheduling/ng_zone_scheduling' ;
26- import { getNgZone } from '../zone/ng_zone' ;
2722
2823/**
2924 * The Angular platform is the entry point for Angular on a web page.
@@ -53,21 +48,8 @@ export class PlatformRef {
5348 moduleFactory : NgModuleFactory < M > ,
5449 options ?: BootstrapOptions & { applicationProviders ?: Array < Provider | EnvironmentProviders > } ,
5550 ) : Promise < NgModuleRef < M > > {
56- const defaultZoneCdProviders = [ ] ;
57- const ZONELESS_BY_DEFAULT = true ;
58- if ( ! ZONELESS_BY_DEFAULT ) {
59- const ngZoneFactory = ( ) =>
60- getNgZone ( options ?. ngZone , {
61- ...getNgZoneOptions ( {
62- eventCoalescing : options ?. ngZoneEventCoalescing ,
63- runCoalescing : options ?. ngZoneRunCoalescing ,
64- } ) ,
65- } ) ;
66- defaultZoneCdProviders . push ( internalProvideZoneChangeDetection ( { ngZoneFactory} ) ) ;
67- }
6851 const allAppProviders = [
6952 provideZonelessChangeDetectionInternal ( ) ,
70- ...defaultZoneCdProviders ,
7153 ...( options ?. applicationProviders ?? [ ] ) ,
7254 errorHandlerEnvironmentInitializer ,
7355 ...( ngDevMode ? [ validAppIdInitializer ] : [ ] ) ,
0 commit comments