]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/main.ts
Fix ldap test
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
index 2d1749c420256a02eabaad237149a89975eb9bce..0fddf3aace64c3d7938a4b25b1adfb7c01288806 100644 (file)
@@ -1,6 +1,6 @@
-import { enableProdMode } from '@angular/core'
+import { ApplicationRef, enableProdMode } from '@angular/core'
+import { enableDebugTools } from '@angular/platform-browser'
 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
-
 import { AppModule } from './app/app.module'
 import { environment } from './environments/environment'
 
@@ -27,6 +27,14 @@ const bootstrap = () => platformBrowserDynamic()
                })
     }
 
+    if (!environment.production) {
+      const applicationRef = bootstrapModule.injector.get(ApplicationRef)
+      const componentRef = applicationRef.components[0]
+
+      // allows to run `ng.profiler.timeChangeDetection();`
+      enableDebugTools(componentRef)
+    }
+
     return bootstrapModule
   })
   .catch(err => {