]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/main.ts
Translated using Weblate (Czech)
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
CommitLineData
68f6c87a
C
1import { ApplicationRef, enableProdMode } from '@angular/core'
2import { enableDebugTools } from '@angular/platform-browser'
b6827820 3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
b6827820
C
4import { AppModule } from './app/app.module'
5import { environment } from './environments/environment'
63c4db6d
C
6
7if (environment.production) {
b6827820 8 enableProdMode()
63c4db6d
C
9}
10
77d07d69 11const 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 29bootstrap()