]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/main.browser.ts
Add user update for admins
[github/Chocobozzz/PeerTube.git] / client / src / main.browser.ts
CommitLineData
df98563e
C
1/* tslint: disable */
2
ab32b0fc
C
3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4import { decorateModuleRef } from './app/environment';
8635a2c7
C
5
6/**
ab32b0fc
C
7 * App Module
8 * our top level module that holds all of our components
9 */
10import { AppModule } from './app';
41a2aee3 11
8635a2c7 12/**
ab32b0fc
C
13 * Bootstrap our Angular app with a top level NgModule
14 */
15export function main(): Promise<any> {
16 return platformBrowserDynamic()
17 .bootstrapModule(AppModule)
18 .then(decorateModuleRef)
8635a2c7 19 .catch((err) => console.error(err));
4a6995be
C
20}
21
8635a2c7
C
22/**
23 * Needed for hmr
24 * in prod this is replace for document ready
25 */
26switch (document.readyState) {
27 case 'loading':
28 document.addEventListener('DOMContentLoaded', _domReadyHandler, false);
29 break;
30 case 'interactive':
31 case 'complete':
32 default:
33 main();
34}
35
36function _domReadyHandler() {
37 document.removeEventListener('DOMContentLoaded', _domReadyHandler, false);
38 main();
39}