import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' ; import { enableProdMode } from '@angular/core' ; import { AppModule } from './app/app.module' ; if ( process . env . NODE_ENV === 'production' ) { enableProdMode ( ) ; } export function main ( ) { return platformBrowserDynamic ( ) . bootstrapModule ( AppModule ) . catch ( ( err ) => console . error ( err ) ) ; } if ( document . readyState === 'complete' ) { main ( ) ; } else { document . addEventListener ( 'DOMContentLoaded' , main ) ; }