1 import { ApplicationRef, enableProdMode } from '@angular/core'
2 import { enableDebugTools } from '@angular/platform-browser'
3 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
4 import { AppModule } from './app/app.module'
5 import { environment } from './environments/environment'
7 if (environment.production) {
11 const bootstrap = () => platformBrowserDynamic()
12 .bootstrapModule(AppModule)
13 .then(bootstrapModule => {
14 if (!environment.production) {
15 const applicationRef = bootstrapModule.injector.get(ApplicationRef)
16 const componentRef = applicationRef.components[0]
18 // allows to run `ng.profiler.timeChangeDetection();`
19 enableDebugTools(componentRef)
22 return bootstrapModule