diff options
Diffstat (limited to 'client/src/main.ts')
-rw-r--r-- | client/src/main.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/main.ts b/client/src/main.ts index 2d1749c42..0fddf3aac 100644 --- a/client/src/main.ts +++ b/client/src/main.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { enableProdMode } from '@angular/core' | 1 | import { ApplicationRef, enableProdMode } from '@angular/core' |
2 | import { enableDebugTools } from '@angular/platform-browser' | ||
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' |
3 | |||
4 | import { AppModule } from './app/app.module' | 4 | import { AppModule } from './app/app.module' |
5 | import { environment } from './environments/environment' | 5 | import { environment } from './environments/environment' |
6 | 6 | ||
@@ -27,6 +27,14 @@ const bootstrap = () => platformBrowserDynamic() | |||
27 | }) | 27 | }) |
28 | } | 28 | } |
29 | 29 | ||
30 | if (!environment.production) { | ||
31 | const applicationRef = bootstrapModule.injector.get(ApplicationRef) | ||
32 | const componentRef = applicationRef.components[0] | ||
33 | |||
34 | // allows to run `ng.profiler.timeChangeDetection();` | ||
35 | enableDebugTools(componentRef) | ||
36 | } | ||
37 | |||
30 | return bootstrapModule | 38 | return bootstrapModule |
31 | }) | 39 | }) |
32 | .catch(err => { | 40 | .catch(err => { |