aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/main.browser.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-11 17:36:46 +0100
committerChocobozzz <me@florianbigard.com>2017-12-12 10:58:16 +0100
commit63c4db6d71b98523753c51747e308682d9a2e8a0 (patch)
treed26c0d092ce016f2afe56bf71b08ca4698fe673f /client/src/main.browser.ts
parent908f6e5e38e85cc0debab0051b7fa34b13025f96 (diff)
downloadPeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.gz
PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.tar.zst
PeerTube-63c4db6d71b98523753c51747e308682d9a2e8a0.zip
Move to angular cli
Diffstat (limited to 'client/src/main.browser.ts')
-rw-r--r--client/src/main.browser.ts45
1 files changed, 0 insertions, 45 deletions
diff --git a/client/src/main.browser.ts b/client/src/main.browser.ts
deleted file mode 100644
index 28f0d5781..000000000
--- a/client/src/main.browser.ts
+++ /dev/null
@@ -1,45 +0,0 @@
1/* tslint: disable */
2
3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
4import { decorateModuleRef } from './app/environment'
5import { hmrModule } from '@angularclass/hmr'
6
7/**
8 * App Module
9 * our top level module that holds all of our components
10 */
11import { AppModule } from './app'
12
13/**
14 * Bootstrap our Angular app with a top level NgModule
15 */
16export function main (): Promise<any> {
17 return platformBrowserDynamic()
18 .bootstrapModule(AppModule)
19 .then(decorateModuleRef)
20 .then((ngModuleRef: any) => {
21 // `module` global ref for webpackhmr
22 // Don't run this in Prod
23 return hmrModule(ngModuleRef, module)
24 })
25 .catch((err) => console.error(err))
26}
27
28/**
29 * Needed for hmr
30 * in prod this is replace for document ready
31 */
32switch (document.readyState) {
33 case 'loading':
34 document.addEventListener('DOMContentLoaded', _domReadyHandler, false)
35 break
36 case 'interactive':
37 case 'complete':
38 default:
39 main()
40}
41
42function _domReadyHandler () {
43 document.removeEventListener('DOMContentLoaded', _domReadyHandler, false)
44 main()
45}