src/main.ts
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
// depending on the env mode, enable prod mode or add debugging modules
// TODO: check what ENV does, and where it comes from
if (process.env.ENV === 'build') {
enableProdMode();
}
export function main() {
return platformBrowserDynamic().bootstrapModule(AppModule);
}
if (document.readyState === 'complete') {
main();
} else {
document.addEventListener('DOMContentLoaded', main);
}
// eslint-disable