From c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Jan 2017 12:16:00 +0100 Subject: Client: add basic aot support --- client/src/main.browser.aot.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 client/src/main.browser.aot.ts (limited to 'client/src/main.browser.aot.ts') 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 @@ +import { platformBrowser } from '@angular/platform-browser'; +import { decorateModuleRef } from './app/environment'; +/* + * App Module + * our top level module that holds all of our components + */ +import { AppModuleNgFactory } from '../compiled/src/app/app.module.ngfactory'; + +/* + * Bootstrap our Angular app with a top level NgModule + */ +export function main(): Promise { + return platformBrowser() + .bootstrapModuleFactory(AppModuleNgFactory) + .then(decorateModuleRef) + .catch((err) => console.error(err)); +} + +export function bootstrapDomReady() { + document.addEventListener('DOMContentLoaded', main); +} + +bootstrapDomReady(); -- cgit v1.2.3