diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
commit | c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 (patch) | |
tree | e5177a26dae755833122c4ef73744c2a7f9b53fc /client/src/main.browser.aot.ts | |
parent | 80deae8d198f6a376b477d780e76966f8fbb72ce (diff) | |
download | PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.gz PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.zst PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.zip |
Client: add basic aot support
Diffstat (limited to 'client/src/main.browser.aot.ts')
-rw-r--r-- | client/src/main.browser.aot.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/client/src/main.browser.aot.ts b/client/src/main.browser.aot.ts new file mode 100644 index 000000000..29ecf7349 --- /dev/null +++ b/client/src/main.browser.aot.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | import { platformBrowser } from '@angular/platform-browser'; | ||
2 | import { decorateModuleRef } from './app/environment'; | ||
3 | /* | ||
4 | * App Module | ||
5 | * our top level module that holds all of our components | ||
6 | */ | ||
7 | import { AppModuleNgFactory } from '../compiled/src/app/app.module.ngfactory'; | ||
8 | |||
9 | /* | ||
10 | * Bootstrap our Angular app with a top level NgModule | ||
11 | */ | ||
12 | export function main(): Promise<any> { | ||
13 | return platformBrowser() | ||
14 | .bootstrapModuleFactory(AppModuleNgFactory) | ||
15 | .then(decorateModuleRef) | ||
16 | .catch((err) => console.error(err)); | ||
17 | } | ||
18 | |||
19 | export function bootstrapDomReady() { | ||
20 | document.addEventListener('DOMContentLoaded', main); | ||
21 | } | ||
22 | |||
23 | bootstrapDomReady(); | ||