Fix HMR again following previous change

This commit is contained in:
SteveSandersonMS
2016-09-19 17:40:17 +01:00
parent 41f1f6fe82
commit cd18489f00

View File

@@ -16,8 +16,11 @@ if (hotModuleReplacement) {
enableProdMode(); enableProdMode();
} }
// Boot the application // Boot the application, either now or when the DOM content is loaded
const platform = platformUniversalDynamic(); const platform = platformUniversalDynamic();
document.addEventListener('DOMContentLoaded', () => { const bootApplication = () => { platform.bootstrapModule(AppModule); };
platform.bootstrapModule(AppModule); if (document.readyState === 'complete') {
}); bootApplication();
} else {
document.addEventListener('DOMContentLoaded', bootApplication);
}