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

Commit 41f1f6f

Browse files
Delay Angular 2 bootstrapping until DOMContentLoaded
1 parent ca99a23 commit 41f1f6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/Angular2Spa/ClientApp/boot-client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ if (hotModuleReplacement) {
1818

1919
// Boot the application
2020
const platform = platformUniversalDynamic();
21-
platform.bootstrapModule(AppModule);
21+
document.addEventListener('DOMContentLoaded', () => {
22+
platform.bootstrapModule(AppModule);
23+
});

0 commit comments

Comments
 (0)