Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit ae39752

Browse files
author
Alexander Rampp
committed
Workaround for issue that WebPack cannot find bootstrap
See angular/angular-cli#2887
1 parent 3deeea6 commit ae39752

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/main.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ console.info("App started")
1111
if (environment.production) {
1212
enableProdMode();
1313
}
14+
1415
declare var Office: any;
16+
17+
function bootstrap() {
18+
platformBrowserDynamic().bootstrapModule(AppModule);
19+
}
20+
1521
if (typeof Office !== 'undefined') {
16-
// when Office has initalized, manually bootstrap the app
1722
Office.initialize = function () {
1823
console.debug("initializing within Office")
19-
platformBrowserDynamic().bootstrapModule(AppModule);
24+
bootstrap();
2025
};
21-
} else {
22-
console.debug("initializing outside of office")
23-
platformBrowserDynamic().bootstrapModule(AppModule);
26+
}
27+
else {
28+
console.debug("initializing outside of office");
29+
bootstrap();
2430
}

0 commit comments

Comments
 (0)