mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix an issue where the app woulnd't start if server side rendering was disabled
This commit is contained in:
@@ -6,6 +6,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { bootloader } from '@angularclass/bootloader';
|
||||
|
||||
import { load as loadWebFont } from 'webfontloader';
|
||||
import { hasValue } from './app/shared/empty.util';
|
||||
|
||||
import { BrowserAppModule } from './modules/app/browser-app.module';
|
||||
|
||||
@@ -28,4 +29,8 @@ export function main() {
|
||||
}
|
||||
|
||||
// support async tag or hmr
|
||||
document.addEventListener('DOMContentLoaded', () => bootloader(main));
|
||||
if (hasValue(ENV_CONFIG.universal) && ENV_CONFIG.universal.preboot === false) {
|
||||
bootloader(main);
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', () => bootloader(main));
|
||||
}
|
||||
|
Reference in New Issue
Block a user