]>
Commit | Line | Data |
---|---|---|
68f6c87a C |
1 | import { ApplicationRef, enableProdMode } from '@angular/core' |
2 | import { enableDebugTools } from '@angular/platform-browser' | |
b6827820 | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' |
b6827820 C |
4 | import { AppModule } from './app/app.module' |
5 | import { environment } from './environments/environment' | |
63c4db6d C |
6 | |
7 | if (environment.production) { | |
b6827820 | 8 | enableProdMode() |
63c4db6d C |
9 | } |
10 | ||
77d07d69 | 11 | const bootstrap = () => platformBrowserDynamic() |
361dcebc | 12 | .bootstrapModule(AppModule) |
78967fca | 13 | .then(bootstrapModule => { |
68f6c87a C |
14 | if (!environment.production) { |
15 | const applicationRef = bootstrapModule.injector.get(ApplicationRef) | |
16 | const componentRef = applicationRef.components[0] | |
17 | ||
18 | // allows to run `ng.profiler.timeChangeDetection();` | |
19 | enableDebugTools(componentRef) | |
20 | } | |
21 | ||
78967fca C |
22 | return bootstrapModule |
23 | }) | |
24 | .catch(err => { | |
25 | console.error(err) | |
26 | return null | |
27 | }) | |
77d07d69 | 28 | |
4f926722 | 29 | bootstrap() |